News for hackers. Stuff that matters.
Re:Popularizing Haskell through easy web deployment by ocharles on Saturday December 07, 2013 @10:41AM (#6866619)
Not just is that function pure, but free theorems indicate that the only way you can get an a is by using the Vector that goes in. Sure, it could ignore the Int - we don't have linear types, afterall - but it really does narrow down the "what could this do?" options.
Re:Popularizing Haskell through easy web deployment by gnuvince on Saturday December 07, 2013 @01:15PM (#6867088)
For those interested, ocharles is talking about Theorems for Free![1] by Phil Wadler. Also be sure to check out his 24 Days of Hackage 2013.

[1] http://ttic.uchicago.edu/~dreyer/course/papers/wadler.pdf [2] http://ocharles.org.uk/blog/pages/2013-12-01-24-days-of-hack...