Hacker News new | ask | show | jobs
by zohebv 5046 days ago
Some examples

1. Purely declarative animations in a general purpose language http://conal.net/fran/tutorial.htm

2. A recursive descent parser where you can declare your grammar as in yacc i.e. it is not a separate compiler generator but a regular library, and the code is type safe unlike yacc. The best part is that the actual library is just 2 lines of code, thanks to the magic of lazy evaluation and a powerful type system.

result v = \inp -> [(v,inp)]

p `bind` f = \inp -> concat [f v out | (v,out) <- p inp]

http://eprints.nottingham.ac.uk/237/1/monparsing.pdf