Add filter-map to base-env.ss
original commit: 39c343ec18dc9a850e1461869979a7c06e8d05b4
This commit is contained in:
parent
b6fc5b6d36
commit
a42d2b6dd9
|
@ -4,7 +4,7 @@
|
|||
;; these are libraries providing functions we add types to that are not in scheme/base
|
||||
(require
|
||||
"extra-procs.ss"
|
||||
(only-in scheme/list cons? take drop add-between last)
|
||||
(only-in scheme/list cons? take drop add-between last filter-map)
|
||||
(only-in rnrs/lists-6 fold-left)
|
||||
'#%paramz
|
||||
(only-in scheme/match/runtime match:error)
|
||||
|
@ -147,6 +147,11 @@
|
|||
. -> .
|
||||
(-lst b))
|
||||
((a . -> . B) (-lst a) . -> . (-lst a))))]
|
||||
[filter-map (-polydots (c a b)
|
||||
((list
|
||||
((list a) (b b) . ->... . (-opt c))
|
||||
(-lst a))
|
||||
((-lst b) b) . ->... . (-lst c)))]
|
||||
[take (-poly (a) ((-lst a) -Integer . -> . (-lst a)))]
|
||||
[drop (-poly (a) ((-lst a) -Integer . -> . (-lst a)))]
|
||||
[last (-poly (a) ((-lst a) . -> . a))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user