Re: SRFI 232: An advanced currying form
Dr. Arne Babenhauserheide 09 Jan 2022 01:21 UTC
"Dr. Arne Babenhauserheide" <xxxxxx@web.de> writes:
>> Scheme lacks a flexible way to create and apply curried procedures.
>> This SRFI describes lambda*, a variant of lambda that creates true
>> curried procedures which also behave just like ordinary Scheme
>> procedures. They can be
>> applied to their arguments one-by-one, all at once, or anywhere in
>> between, without any novel syntax. lambda* also supports nullary and
> Perhaps because of this clumsiness, Scheme has another form which
> provides something a little like currying. The cut operator, introduced
> by SRFI 26, is not a currying operator; instead, it allows procedures to
> be easily specialized on given parameters. However, this is not too
> difficult in ordinary Scheme (cf. Al Petrofsky's comment to the SRFI 26
> mailing list), and, as such, cut is not frequently seen in Scheme
> programs. cut also introduces a novel notation using the tokens <> and
> <...>, which may pose an obstacle for new users.
One more point: When doing the advent of code this year (the first 10
tasks),¹ I learned to love cut. Cut with map or fold is great for
concise algorithms.
Best wishes,
Arne
¹: https://www.draketo.de/software/advent-of-wisp-code-2021
--
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de