mirror of
https://github.com/teo3300/rust-mal.git
synced 2026-01-12 01:05:32 +01:00
Fracional numbers as extension of integernumbers, with Euclid's algorithm for fractional simplification, added functions "floor" "num" "den", added syntax [+/-]<num>/<den> to define fractional numbers BREAKING CHANGE:
5 lines
214 B
Plaintext
5 lines
214 B
Plaintext
; filter with builtin function
|
|
(assert-eq (list '(1) '(2) '(3)) (filter car (list '(1) '() '(2) '() '(3))))
|
|
; filter with lambda function
|
|
(assert-eq (list 1 2 3) (filter num? (list 1 "string" 2 'symbol 3 :label)))
|