For example, in the list monad bind operation:
xs >>= f = concat (map f xs)
What is the argument f called? A binder? mapper? transformer?
Sorry to be glib, but the argument is called f
, since depending on what it does, one of any number of names could be applicable. What matters, simply, is its type a -> m b
for your Monad
instance m
. As David Yong's comment notes, we can describe things of that form as an "arrow (or morphism) in the Kleisli category of m
".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With