combinators: Add juxt.

pull/1/head
Luis Guilherme Coelho 2023-12-30 00:10:15 -03:00
parent 7054d7204b
commit 73f6152269
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
2 changed files with 6 additions and 1 deletions

View File

@ -106,7 +106,7 @@
#|gawk |# gawk
#|guile |# guile-3.0-latest guile-colorized guile-readline
#|less |# less
#|linux |# e2fsprogs eudev fuse iproute kbd kmod lm-sensors procps
#|linux |# e2fsprogs eudev iproute kbd kmod lm-sensors procps
psmisc util-linux
#|man |# man-db mandoc man-pages
#|shells |# dash-next

View File

@ -8,6 +8,7 @@
disjoin
inclusive-disjoin
flip
juxt
partial
swap))
@ -48,3 +49,7 @@
(define ((swap proc) arg1 arg2 . 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)))