Add filter-map to base-env.ss

original commit: 39c343ec18dc9a850e1461869979a7c06e8d05b4
This commit is contained in:
Stevie Strickland 2008-07-15 00:33:14 -04:00
parent b6fc5b6d36
commit a42d2b6dd9

View File

@ -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))]