November 2017
Intermediate to advanced
670 pages
17h 35m
English
A functor consists of a structure, usually a slice in Go, and a transformation operation, that is, the mapping function:
|
Structure |
Eight blocks, each filled with a different color |
|
Transformation operation |
f(x) = x - 30, where x is the hue |
Below, is a functor that maps eight colored blocks to eight corresponding blocks whose color has been altered by applying the transformation operations above to adjust the hue of the color displayed in the boxes.

The preceding diagram shows a single f(x) arrow to keep the clutter to a minimum, but a more accurate representation would show arrows from each original element ...