combinators: Add juxt.
parent
7054d7204b
commit
73f6152269
2
buer.scm
2
buer.scm
|
@ -106,7 +106,7 @@
|
||||||
#|gawk |# gawk
|
#|gawk |# gawk
|
||||||
#|guile |# guile-3.0-latest guile-colorized guile-readline
|
#|guile |# guile-3.0-latest guile-colorized guile-readline
|
||||||
#|less |# less
|
#|less |# less
|
||||||
#|linux |# e2fsprogs eudev fuse iproute kbd kmod lm-sensors procps
|
#|linux |# e2fsprogs eudev iproute kbd kmod lm-sensors procps
|
||||||
psmisc util-linux
|
psmisc util-linux
|
||||||
#|man |# man-db mandoc man-pages
|
#|man |# man-db mandoc man-pages
|
||||||
#|shells |# dash-next
|
#|shells |# dash-next
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
disjoin
|
disjoin
|
||||||
inclusive-disjoin
|
inclusive-disjoin
|
||||||
flip
|
flip
|
||||||
|
juxt
|
||||||
partial
|
partial
|
||||||
swap))
|
swap))
|
||||||
|
|
||||||
|
@ -48,3 +49,7 @@
|
||||||
|
|
||||||
(define ((swap proc) arg1 arg2 . args)
|
(define ((swap proc) arg1 arg2 . args)
|
||||||
(apply proc arg2 arg1 args))
|
(apply proc arg2 arg1 args))
|
||||||
|
|
||||||
|
(define ((juxt proc . more-procs) arg . more-args)
|
||||||
|
(map (lambda (proc) (apply proc arg more-args))
|
||||||
|
(cons proc more-procs)))
|
||||||
|
|
Loading…
Reference in New Issue