mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-20 22:29:16 +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?
|
list-prefix?
|
||||||
string-replace-all
|
string-replace-all
|
||||||
take
|
take
|
||||||
|
drop
|
||||||
filter)
|
filter)
|
||||||
(inline
|
(inline
|
||||||
env:frame-values
|
env:frame-values
|
||||||
|
@ -342,6 +343,11 @@
|
||||||
(cons (car lis)
|
(cons (car lis)
|
||||||
(recur (cdr lis) (- k 1))))))
|
(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
|
; char->natural : char -> natural
|
||||||
(define (char->natural c)
|
(define (char->natural c)
|
||||||
(let ((i (char->integer c)))
|
(let ((i (char->integer c)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue