[Haskell-cafe] Newbie question about Haskell skills progress

Dougal Stanton ithika at gmail.com
Tue Jul 31 15:14:24 EDT 2007


On 31/07/07, peterv <bf3 at telenet.be> wrote:
>
>
>
>
> Having only a couple of days of practice programming Haskell (but having
> read lots of books and docs), I find myself writing very explicit low level
> code using inner "aux" functions (accumulators and loops). Then I force
> myself  to revise the code, replacing these aux functions with suitable
> higher-order functions from the library. However, I would like to use these
> higher order functions right away, without using low-level aux constructs,
> which is most likely caused by my very long history of imperative
> programming…

Seems sensible to me! It'll come with time, I'm sure.

I often find it useful to think about general abstractions and then
choose an approach from there:

- many-to-one -> fold
- many-to-many -> map
- one-to-many -> unfold

And so on in a similar fashion. This might mean you do something
stupid (as witnessed by my most recent visit to Haskell Cafe, where I
said some very silly things [1] but also got some enormously
clever/silly pointers [2]). But it's all part of life's rich pattern,
and I can't think of a nicer place to make a fool of one's self than
in this community.

[1]: <http://www.haskell.org/pipermail/haskell-cafe/2007-July/029274.html>
[2]: <http://www.haskell.org/pipermail/haskell-cafe/2007-July/029285.html>

> Is this the "normal" way of progressing in Haskell, or should I consider a
> different approach?

There are probably some people here who were imbibing type theory and
lambda calculus with their mammy's milk... but for the rest of us,
it's just one small step at a time.

Cheers

D.


More information about the Haskell-Cafe mailing list