3 ms·
the first one means that flip fmap is a function which, given an "f a", and a function from a to b, will produce an "f b". for example, if "f" is "list of" and
by drdeca 5y ago
the first one means that flip fmap is a function which, given an "f a", and a function from a to b, will produce an "f b".
for example, if "f" is "list of" and a is "integer" and b is "string", then flip fmap would take as input a list of integer, and a function from integer to string, and produce a list of string.
If you've done some topology:
[or, maybe a is a particular topological space and b is another topological space, and f is "the fundamental group of", then given an element of the fundamental group of a, and a function from the topological space a to the topological space b, it will give you a corresponding element of the fundamental group of b.]
a and b are both types of things, f takes in a type, and outputs another type. so, a and f a are both types (usually different types).
the thing is that f doesn't just let you make a type from another type, it also lets you translate a function from the type a to the type b, to a function from the type f a to the type f b.