mirror of
https://github.com/teo3300/rust-mal.git
synced 2026-01-12 01:05:32 +01:00
Small improvements in function definition
- Inline 'def! t' for filter - Removed 'len'
This commit is contained in:
@ -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)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user