Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

automatic currying in scheme

Name: Anonymous 2008-11-23 23:19

is it possible without macros?

Name: Anonymous 2008-11-26 4:06

SRFI-26: Notation for Specializing Parameters without Currying

[b]Why not real currying/uncurrying?[/b]

It is possible in Scheme to implement a macro turning a multi-argument
procedure into a nesting of single-argument procedures and back. These
operations are usually called "curry" and "uncurry" in other
programming languages. Yet, Scheme remains an inherently uncurried
language and is not prepared to deal with curried procedures in a
convenient way. Hence, a "by the book" implementation of currying
would only be useful if you apply it in the sequence "curry,
specialize some arguments, and uncurry again"---which is exactly the
purpose of the macro cut specified in this document. The primary
relevance of currying/uncurrying in Scheme is to teach concepts of
combinatory logic.


http://srfi.schemers.org/srfi-26/srfi-26.html

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List