On Sat, 3 Jul 2004, Nathan Weston wrote:
> My first thought is to use fold here, since this function accumulates a result
> as it traverses the list. But fold consumes one element of the list at a
> time, while area needs to examine the first three elements of the list, and
> consume two of th
I have to second that... even having previous
experience with other functional languages and some
other books on the subject, "Yet Another Haskell
Tutorial" was a very good read. I am waiting to see
the parts that remain to be finished.
---
[]s, Andrei de A. Formiga
--- wilkes joiner <[EMAIL
I strongly recommend "Yet Another Haskell Tutorial by Hal Daume III et
al." in conjuction or prior to CFP book. It's really helped clear
some things ups for me. It seems more pragmatic and less academic
than the other learning haskell resources.
Here's the link -> http://www.isi.edu/~hdaume/htu
Nathan Weston wrote:
I am learning haskell (and functional programming), from the School of
Expression book.
There's an exercise to rewrite the following function (for computing the area
of a polygon) using map, fold, etc:
data Shape = Polygon [Vertex]
area (Polygon (v1:vs)) = polyArea vs
w