A Type for Almost Functors
Sometimes you have a type you want to be a functor but, for whatever reason, it can’t be. As a concrete example, consider a type representing some future value yet to be computed. I first encountered this when playing with a material system for a ray tracer. In this system there were a small number of material “types” which could be evaluated using some “light parameters” to produce a color output....