added provide form to rsc3.rkt
This commit is contained in:
parent
fdfb5558f3
commit
5c7fe7d54e
1 changed files with 9 additions and 7 deletions
|
@ -8,25 +8,27 @@
|
||||||
"../sosc/transport.rkt"
|
"../sosc/transport.rkt"
|
||||||
"../sosc/sosc.rkt"
|
"../sosc/sosc.rkt"
|
||||||
(prefix-in srfi: srfi/27)
|
(prefix-in srfi: srfi/27)
|
||||||
(prefix-in srfi: srfi/19)
|
(prefix-in srfi: srfi/19))
|
||||||
)
|
|
||||||
|
|
||||||
|
;; TODO - export only useful funcs
|
||||||
|
(provide (all-defined-out)
|
||||||
|
send)
|
||||||
|
|
||||||
;; [a] -> int -> [a]
|
;; [a] -> int -> [a]
|
||||||
(define extend
|
(define extend
|
||||||
(lambda (l n)
|
(lambda (l n)
|
||||||
(let ((z (length l)))
|
(let ((z (length l)))
|
||||||
(cond ((= z n) l)
|
(cond ((= z n) l)
|
||||||
((> z n) (take n l))
|
((> z n) (take n l))
|
||||||
(else (extend (append2 l l) n))))))
|
(else (extend (append2 l l) n))))))
|
||||||
|
|
||||||
;; [a] -> int -> [a]
|
;; [a] -> int -> [a]
|
||||||
(define take-cycle
|
(define take-cycle
|
||||||
(lambda (l n)
|
(lambda (l n)
|
||||||
(if (null? l)
|
(if (null? l)
|
||||||
nil
|
nil
|
||||||
(cons (head l)
|
(cons (head l)
|
||||||
(take-cycle (drop n l) n)))))
|
(take-cycle (drop n l) n)))))
|
||||||
|
|
||||||
;; (a -> a -> a) -> ([a] -> [a])
|
;; (a -> a -> a) -> ([a] -> [a])
|
||||||
(define differentiate-with
|
(define differentiate-with
|
||||||
|
|
Loading…
Reference in a new issue