add DROP, similar to Clojure counterpart.
This commit is contained in:
parent
131b9848e9
commit
2b46bc5867
|
@ -15,6 +15,12 @@
|
|||
(when (> n 0)
|
||||
(rec n lst nil))))
|
||||
|
||||
(defun drop (n lst)
|
||||
"Drop n elements from the list."
|
||||
(if (or (<= n 0) (null lst))
|
||||
lst
|
||||
(drop (- n 1) (cdr lst))))
|
||||
|
||||
(defun interpose (x sep)
|
||||
"Takes a list and a separator, and places separator between element
|
||||
of the list."
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#:defmacro! ; Let Over Lambda utilities
|
||||
#:interpose ; My utilities
|
||||
#:take
|
||||
#:drop
|
||||
#:build-list
|
||||
#:partial
|
||||
#:macroexpand-n
|
||||
|
|
Loading…
Reference in New Issue