mirror of
https://github.com/teo3300/rust-mal.git
synced 2026-01-12 01:05:32 +01:00
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:
@ -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))
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
(assert-fail '(if))
|
||||
|
||||
; let*
|
||||
(assert (let* [let-a 1
|
||||
(assert-eq (let* [let-a 1
|
||||
let-b 2]
|
||||
(assert-eq let-a 1)
|
||||
(assert-eq let-b 2)
|
||||
|
||||
Reference in New Issue
Block a user