Open countvajhula opened 3 years ago
generator-map
could now be expressed as (self-map/c generator? (head function/c))
.
It would still be useful if we could use something like (map/c #:container generatorof integer? string?)
, which would tell us that the input generator has integer values and the output one has string values, but in order to do this we'd likely need such types to provide their own container forms, e.g. generatorof
.
Map and filter notions could apply to types that aren't sequences. E.g.
generator-map
should be able to usemap/c
but it can't at the moment.map/c
should be generalized to accept a "functor" parameter in some way (without necessarily requiring a functor interface) so that it needn't be a sequence.