April 16th, 2004

  • evan

more haskell and language ramblings

More playing with Haskell.

Collapse )

Collapse )

I think I first became curious about the language from reading about graydon (long before he was on LJ, even!) writing nice things about it. So thanks!

Also: I managed to make the interpreter segfault. I tried to reproduce it with a smaller test case, but I couldn't. It only occurred when I shadowed a variable:
let c = ...
let c = ...

If I renamed the second one to c' it would run happily. (And only renamed it: it wasn't like I used the renamed one differently.)

* As always, there are exceptions that get stranger and stranger, like polysynthetic languages or Prolog / J.
  • evan


    reverse          =  foldl (flip (:)) []
    any p            =  or . map p
    all p            =  and . map p

readFile   :: FilePath -> IO String