Adds several new REPL utilities

Also removes some broken list library functions
This commit is contained in:
2025-02-07 18:25:11 -06:00
parent e6e18239a7
commit 0a505172b4
4 changed files with 94 additions and 35 deletions

View File

@ -65,13 +65,4 @@ any? = y (\self pred : matchList
false
(\h z : or? (pred h) (self pred z)))
unique_ = y (\self seen : matchList
t
(\head rest : matchBool
(self seen rest)
(pair head (self (pair head seen) rest))
(lExist? head seen)))
unique = \xs : unique_ t xs
intersect = \xs ys : filter (\x : lExist? x ys) xs
union = \xs ys : unique (append xs ys)