[Haskell-cafe] about Haskell code written to be "too smart"
Jonathan Cast
jonathanccast at fastmail.fm
Tue Mar 24 18:17:35 EDT 2009
On Tue, 2009-03-24 at 23:15 +0100, Manlio Perillo wrote:
> Dan Piponi ha scritto:
> >> Miguel Mitrofanov wrote:
> >>> takeList = evalState . mapM (State . splitAt)
> >
> >> However, ironically, I stopped using them for pretty
> >> much the same reason that Manlio is saying.
> >
> > Are you saying there's a problem with this implementation? It's the
> > only one I could just read immediately.
>
> Yes, you understand it immediately once you know what a state monad is.
> But how well is introduced, explained and emphasized the state monad in
> current textbooks?
>
> When I started learning Haskell, the first thing I learned was recursion
> and pattern matching.
You know, this might actually need to be looked into.
You need to know recursion and pattern-matching to *write* re-usable
higher-order functions, but how appropriate is that as the first thing
taught?
jcc
More information about the Haskell-Cafe
mailing list