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-27 1:44

>>15
If you don't understand what Haskell is up to, you don't know Lisp well enough. Unless the part you don't get is why all the syntax. That's just because Haskeller's are nuts.

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