Sujet : Re: Why don't people like lisp?
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.lispDate : 04. Jul 2024, 02:47:17
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v64uv5$2erlp$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Pan/0.158 (Avdiivka; )
On Wed, 03 Jul 2024 18:11:35 -0700, Paul Rubin wrote:
In Haskell, max always
takes two args of an ordered type, and maximum takes a list arg.
maximum [2] gives 2 but maximum [] throws an empty list exception.
maximum just applies max repeatedly, like using reduce in Lisp.
Seems unnecessary to have two functions when one will do.
... for the variadic versions in CL and Scheme, (max 2) gives 2
but (max) throws a wrong-number-of-args error.
I will admit, Python doesn’t like an empty argument list for max and min
either.
But then, Python max and min work for things besides numbers.