mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-20 14:19:17 +02:00
Added (drop)
This commit is contained in:
parent
2a6ba9bee4
commit
ffdeaa96e3
1 changed files with 6 additions and 0 deletions
|
@ -92,6 +92,7 @@
|
|||
list-prefix?
|
||||
string-replace-all
|
||||
take
|
||||
drop
|
||||
filter)
|
||||
(inline
|
||||
env:frame-values
|
||||
|
@ -342,6 +343,11 @@
|
|||
(cons (car lis)
|
||||
(recur (cdr lis) (- k 1))))))
|
||||
|
||||
(define (drop lis k)
|
||||
;(check-arg integer? k drop)
|
||||
(let iter ((lis lis) (k k))
|
||||
(if (zero? k) lis (iter (cdr lis) (- k 1)))))
|
||||
|
||||
; char->natural : char -> natural
|
||||
(define (char->natural c)
|
||||
(let ((i (char->integer c)))
|
||||
|
|
Loading…
Add table
Reference in a new issue