Adding collect function

- Collect function as fn:(collector, x) -> new_collector for collections
- Moving some definitions to "libs" folder
- Map and filter defined in mal
This commit is contained in:
teo3300
2024-06-19 15:51:20 +09:00
parent 35716afee9
commit c5406458de
8 changed files with 80 additions and 44 deletions

View File

@ -18,10 +18,6 @@
(assert (= (/ -10 -2) 5))
(assert (not (ok? (/ 12 0))))
; mod
(assert (= (mod 10 4) 2))
(assert (= (mod 4 10) 4))
; >
(assert (> 3 2))
(assert (not (> 1 2)))
@ -40,4 +36,4 @@
; <=
(assert (<= 1 3))
(assert (not (<= 3 2)))
(assert (<= 1 1))
(assert (<= 1 1))