Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Going through SICP in Haskell

Name: Anonymous 2010-03-26 11:27

I've been going through SICP, first in Scheme and then in Haskell, and I started wondering...

Is my Haskell too Lisp-y?

filterAccumulate
    :: (Eq t1) =>
       (t1 -> Bool) -> (t2 -> t3 -> t3) -> t3 -> (t1 -> t2) -> t1 -> (t1 -> t1) -> t1 -> t3
filterAccumulate filter combiner nullVal term a next b =
    iter a nullVal
    where
    iter a result =
        if (a == b) then filterCombiner a result
        else iter (next a) (filterCombiner a result)
    filterCombiner a result =
        if (filter a) then combiner (term a) result
        else result

Name: Anonymous 2010-03-26 21:31

C / Perl / occasional Lisp programmer here. Am I the only person who doesn't get the fucking point of Haskell? True, I have little knowledge of the underlying syntax of the language, but from various discussions I've read here and on /code/, I just don't understand how in the hell a Haskell program is supposed to resemble a computer program. I can programs made in various languages, even Lisp, and easily recognize after a few seconds ``oh, that's what it does. I'm guessing when translated/compiled it would look something like blah blah blah.'' When I try to make any kind of sense out of a Haskell program, I feel like I'm trying to program on a mushroom.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List