4 ms·
I really want to see examples of this.
by vittore 9y ago
I really want to see examples of this.
- dbmikus 9y agoThe unification-fd library referenced in the article is probably a pretty good example. I have not looked at it, though, and it would be nice to have explicit bits of code pointed out in an explanation.
- danidiaz 9y agoI've seen mentioned the "streaming" package as an example of this: http://hackage.haskell.org/package/streaming http://hackage.haskell.org/package/streaming "streaming" provides a Stream type which is parameterized by a Functor. The main module in the package provides very general functions which work for any functor and often involve natural transformations and functor compositions and sums. http://hackage.haskell.org/package/streaming-0.1.4.5/docs/Streaming.html http://hackage.haskell.org/package/streaming-0.1.4.5/docs/St... The "Streaming.Prelude" instantiates the functor with a pair type and provides the more concrete API that one would expect from a streaming library. http://hackage.haskell.org/package/streaming-0.1.4.5/docs/Streaming-Prelude.html http://hackage.haskell.org/package/streaming-0.1.4.5/docs/St...
- roflc0ptic 9y agowriting DSLs with Free monads is an example of this. Recursion schemes are another example - see kmett’s library in Haskell, or Matryoshka in Scala.