[Haskell-cafe] pleac, examples, etc
Cale Gibbard
cgibbard at gmail.com
Tue Nov 14 22:07:29 EST 2006
On 14/11/06, chris moline <evilantleredthing at yahoo.ca> wrote:
> --- brad clawsie <clawsie at fastmail.fm> wrote:
> > it would be great if some of the more informed
> > posters here took a stab
> > at filling in
> >
> >
> http://pleac.sourceforge.net/pleac_haskell/index.html
> >
> > a neat site for cookbook-style problem solving
>
> What I've always found funny about pleac is that none
> of the examples are actually Haskell, but some weird
> Haskell-with-oo-features. Does anyone know what
> language it is?
>
> Here are some examples:
>
> password = [1..8].mapM (\_ -> rand (0, chars.length
> -1) >>> (chars!))
>
> -- in haskell, regexp are first class, then can be
> appended, sometimes easier to read
> m0' s = .... (s ==~ dec_number) ....
They are actually Haskell, but notice the appendix:
http://pleac.sourceforge.net/pleac_haskell/a1102.html
It's Haskell with a completely bizarre prelude. No real new features
were added to the language itself.
Replacing composition with reverse function application is a waste of
operator symbols.
Personally, if I was going to change (.), it would be to define it as
fmap, which (as a number of people, myself included, have pointed out)
together with the instance of Functor for ((->) e) would generalise
ordinary composition, map, liftM, etc.
- Cale
More information about the Haskell-Cafe
mailing list