[Haskell] Long live Edison

David Menendez zednenem at psualum.com
Tue Feb 21 01:19:31 EST 2006

ajb at spamcop.net writes:

> G'day all.
> Quoting Robert Dockins <robdockins at fastmail.fm>:
> > -- The Sequence 'rcons' method takes its arguments in the opposite
> > order as the 'lcons' method (for mnemonic purposes).  Should the
> > arguments to 'rcons' be reversed?
> The argument is that they both take their arguments in the order
> that they would do were they implemented with concatenation:
>     lcons x xs === [x] ++ xs
>     rcons xs x === xs ++ [x]
> This certainly makes sense to me.  Is there an argument for using
> the other order?

The order of rcons is also natural for using in-line, e.g. "xs `rcons`
David Menendez <zednenem at psualum.com> | "In this house, we obey the laws
<http://www.eyrie.org/~zednenem>      |        of thermodynamics!"

More information about the Haskell mailing list