21 Feb
2006
21 Feb
'06
6:19 a.m.
ajb@spamcop.net writes:
G'day all.
Quoting Robert Dockins <robdockins@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` x". -- David Menendez <zednenem@psualum.com> | "In this house, we obey the laws <http://www.eyrie.org/~zednenem> | of thermodynamics!"