-
Recent Posts
Archives
Categories
Meta
Category Archives: Type Class
Lens, State is your father… and I can prove it!
Here it is our new blog post, as a sequel of Lens, State Is Your Father. Today, we’ll try to formalize some informal claims that we did in that article and we’ll emphasize on the relevance of proof assistants in … Continue reading
Posted in coq, Lens, monad, Optics, proof, Scala, State, Type Class
Leave a comment
Functional APIs: an OOP approach to FP
In the series of posts about the essence of functional programming, we’ve already seen how we can build purely declarative programs using GADTs. This is a picture of what we got (using more standard cats/scalaz data types): This program above … Continue reading
Posted in algebra, functional programming, Scala, Type Class
Leave a comment
Lens, State Is Your Father
In our last post, we introduced IOCoalgebras as an alternative way of representing coalgebras from an algebraic viewpoint, where Lens was used as a guiding example. In fact, lens is an abstraction that belongs to the group of Optics, a … Continue reading
Posted in algebra, coalgebra, Lens, Optics, State, Type Class
Leave a comment
Updating immutable objects in generic contexts
Immutability is one of the hallmarks of functional design, and writing idiomatic programs in Scala highly relies on manipulating immutable objects. Now, if we don’t have mutable fields (aka vars) … how can we update objects in a convenient way? … Continue reading
Posted in case classes, immutability, Macros, Scala, Speech, Type Class, Updatable
1 Comment