[Haskell wikibook] More on topic reorganization
Daniel Mlot
duplode_1 at yahoo.com.br
Sun May 16 16:32:12 EDT 2010
Hello,
Just to mention I have added some ideas for "Elementary" and
"Intermediate" in the list of topics as well. Alongside some other
issues, there are three things for which I can't see an obvious solution.
* Can we provide meaningful examples of pattern matching on lists
without making use of recursive algorithms? At first I the possibility
of moving the "Recursion" chapter to Basics, just after "Tuples and
Lists", and use the context to introduce x:xs - but that would kind of
defeat the pedagogical proposal of emphasizing function composition
before considering in more depth the "inner workings" of functions. The
most adequate alternative, then, would be to mention pattern matching on
lists only *very* briefly, I guess...
(A related observation. Apfelmus' proposal includes a "Working with
lists" module in Basics which would be dedicated entirely to list
comprehensions. Initially I wondered whether discussing map and filter
in that context would be an improvement. Doing so, however, would
immediately make it necessary to push, at the very least, "Recursion" to
Basics as a prerequisite. Having both map, filter and recursion in
Basics would likely make things too clunky. I also wonder if this
decision on how far to delve into lists in Basics would have any
significant effects in the "Building a Vocabulary" module.)
* I am slightly bothered by having "More on Functions" and "Control
Structures" only at the end of "Elementary Haskell". "Control
Structures" should probably be after "Pattern Matching" anyway, even
more so now that we're presenting case structures for the first time. As
for "More on Functions", I feel moving it to an earlier point (just
after "Recursion", maybe) could improve reading flow (IMO increased
alternation of "syntactic" and "conceptual" modules makes for a less
tiring read). Furthermore, it would allow us to make occasional use of
lambdas, prefixed operators and similar things in the following chapters
without worrying with pre-requisites (and, at the same time, helping
readers to, through small doses, get used to the syntactic variants).
Regards,
Daniel Mlot
P.S.: Apfelmus: Nice thought to have added examples to the cheat sheets.
I only fear they can grow a bit too wide sometimes, but in such cases
nothing stops us from putting a "see on the detailed explanation" note
there :)
More information about the Wikibook
mailing list