This article explores the concept of ranges as functors in Haskell, F#, and C#, and how different elements of the range can be mapped. It discusses the default functor instances for pairs in Haskell, introduces the Data.Functor.Product module, and provides examples of how ranges can be projected and transformed. The article emphasizes that a functor is defined by how it follows the functor laws, even if the results may seem counter-intuitive in some cases.

12m read timeFrom blog.ploeh.dk
Post cover image
Table of contents
Haskell perspective #F# functor #C# functor #Laws #Negations #Conclusion #

Sort: