Closed elliot-u410 closed 1 year ago
Thanks for the kind words!
To map a function over a generator, you should use Transform
. Before generics it was a method of the Generator
called Map
, but since methods can't be generic in Go, it became a top-level function (and was renamed to Transform
to not be confused with the MapOf
series of generators).
Maybe it is a good idea to rename Transform
to Map
, hmm.
Ah, I'm not sure how I missed that. As long as it exists, the name isn't as important to me. Thank you.
(I'll leave this open for some time so that I don't forget about possible renaming).
Love this library! Thank you!
Right now if I want to map a function over a generator, I must use
rapid.Custom
. Would a simplerMap
function be possible where it lets me simply define the translation between two types?