Hasty Briefsbeta

Bilingual

Logic for Programmers by Hillel Wayne

5 hours ago
  • all(l) is equivalent to the AND of all elements in the list.
  • The property all(xs . ys) == all(xs) && all(ys) holds for any two lists.
  • For an empty list, all([]) must be True to preserve the property, and it is the identity element for &&.
  • Similarly, sum of empty list is 0 and any([]) is False.