Small improvements in function definition

- Inline 'def! t' for filter
- Removed 'len'
This commit is contained in:
teo3300
2024-06-19 16:15:33 +09:00
parent c5406458de
commit 5db1cf1910
2 changed files with 3 additions and 12 deletions

View File

@ -13,10 +13,3 @@
(let* [c (car n) n (cdr n)]
(distribute-r (cons c p) n (cons (cons c (concat p n)) t))))))
(distribute-r '() x '())))
(def! len (fn* [l] (def! len-r (fn* [l c]
(if (empty? l)
c
(len-r (cdr l) (+ c 1)))))
(len-r l 0)))