CMS by Drupal
The Haskell programming language
Ran across the homepage of Berkeley Logo a few days ago. One of the things on there is this demo code
to choices :menu [:sofar ] if emptyp :menu [print :sofar stop] foreach first :menu [(choices butfirst :menu sentence :sofar ?)] end
When invoked as
choices [[small medium large] [vanilla [ultra chocolate] lychee [rum raisin] ginger] [cone cup]]
we get a list of choices starting with
small vanilla cone small vanilla cup small ultra chocolate cone small ultra chocolate cup …
I got curious about how Haskell stacks up against Logo here…
This is a pretty clean definition of the Sieve of Eratosthenes in Haskell. Type it at the
So I thought about it tonight and figured out that in Haskell I can generate the Fibonacci sequence using the definition
If you type this at ghci you can say "take 20 l" and get
Laziness weirds programming.
From this interesting blog post:
Which is sadly all too often true. I'm definitely one of the ones who will tend not to find the much happier
I'm slowly learning Haskell. Today's project was something that arguably should be way faster for a fluent Haskell programmer than for a C programmer. It wasn't for me, since I'm still learning the language.
The recent BoingBoing posting on "nontransitive dice" is something I'd seen before and found interesting…
I learned some more Haskell tonight. That's happened a lot of times, though, over many years. I think I'm finally getting the IO monad kind of straightened out, so maybe I'll be OK with the language, finally...