feat: add the partial combinator to the (radix combinators) module
parent
64d5e3a6e7
commit
1ce6f074bd
|
@ -8,6 +8,7 @@
|
|||
disjoin
|
||||
inclusive-disjoin
|
||||
flip
|
||||
partial
|
||||
swap))
|
||||
|
||||
(define ((all-of pred) lst)
|
||||
|
@ -39,6 +40,9 @@
|
|||
((not (apply head-pred args)) (loop tail-preds))
|
||||
(else #f)))))
|
||||
|
||||
(define ((partial proc . args) . more-args)
|
||||
(apply proc (append args more-args)))
|
||||
|
||||
(define ((flip proc) . args)
|
||||
(apply proc (reverse args)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue