let Theta = (\u f. f (u u f)) (\u f. f (u u f)) in
+ ; now you can search for primes, do encryption :-)
+ let gcd = Y (\gcd m n. iszero n m (gcd n (mod m n))) in ; or
+ let gcd = \m n. iszero m n (Y (\gcd m n. iszero n m (lt n m (gcd (sub m n) n) (gcd m (sub n m)))) m n) in
+ let lcm = \m n. or (iszero m) (iszero n) 0 (mul (div m (gcd m n)) n) in
+
+
; length for version 1 lists
let length = Y (\self lst. isempty lst 0 (succ (self (tail lst)))) in
; (might_for_all_i_know_still_be_equal?, tail_of_reversed_right)
; when left is empty, the lists are equal if right is empty
(make_pair
- (not (isempty right))
+ true ; for all we know so far, they might still be equal
(reverse right)
)
; when fold is finished, check sofar-pair