[Haskell-cafe] Nice clean code example?
fa-ml at ariis.it
Fri Jun 30 19:08:15 UTC 2017
On Fri, Jun 30, 2017 at 08:33:29PM +0200, Han Joosten wrote:
> I'd like to showoff some nice Haskell code to a CTO with no experience with
> FP. I promised to send him a small piece of Haskell so he could get an
> idea. The code should be easy to read, without obscure looking operators
> (so sorry, no lens, arrows stuff like that), optionally even do something
> Who has the nicest example laying around?
- a wrongly typed piece of code: then show him a) how ghc(i) pinpoints
the problem part and is very clear in its demands ("I wanted this, you
gave me this") and b) how malleable the type system is.
- a declarative graph made with diagrams (with a graphical result
- parsec (even if you go with applicative style, the code is very readable)
More information about the Haskell-Cafe