[Haskell-cafe] Remember the future

jerzy.karczmarczuk at info.unicaen.fr jerzy.karczmarczuk at info.unicaen.fr
Fri Aug 17 20:00:25 EDT 2007

Andrew Coppin writes: 

> I've seen comments in various places that monads allow you to "borrow 
> things from the future". 
> That sounds completely absurd to me... can anybody explain?

Actually, "borrowing from the future" - in an interpretation which is close
to my own interests - doesn't need monads, but *laziness*. If you find this
absurd, I propose that you have a look on something a bit light, my paper
on a quite crazy way to compute PI with a high precision. The algorithm (not
mine, but of Bailey, Borwein and Plouffe) is a masterpiece of numerical
math, but its implementation relies on a mad borrowing from the future. 


If you don't choke, try another one, the reverse automatic differentiation
algorithm, implemented using a variant of the Wadler's "counter-temporal"
state monad. 


It is quite serious, although inefficient, and has some affinities to the
lazy processing of inherited attributes during parsing. 

More recently, Barak Pearlmutter and Jeff Siskind worked on similar issues,
but I am not sure whether they submitted something ready for the audience.
Please check it out. 

Jerzy Karczmarczuk 

More information about the Haskell-Cafe mailing list