projects
/
lambda.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add in Oleg's list_equal
[lambda.git]
/
lambda_library.mdwn
diff --git
a/lambda_library.mdwn
b/lambda_library.mdwn
index
579668b
..
0c00c45
100644
(file)
--- a/
lambda_library.mdwn
+++ b/
lambda_library.mdwn
@@
-329,5
+329,9
@@
let list_equal =
)
; when fold is finished, check sofar-pair
(\might_be_equal right_tail. and might_be_equal (isempty right_tail))
)
; when fold is finished, check sofar-pair
(\might_be_equal right_tail. and might_be_equal (isempty right_tail))
+
+; most elegant
+let list_equal = \lst. lst (\hd sofar. \lst. and (and (not (isempty lst)) (eq hd (head lst))) (sofar (tail lst))) isempty
+
-->
-->