[Prev][Next][Index][Thread]
Re: Currying in Dylan?
I thought I would add a little to what Chris and Andreas posted.
Dylan's anonymous methods, as in Chris' map(method(a) a + 5 end, #(1, 2,
3)) are the general-purpose answer to your question. There are also 2
special functions in Dylan: curry and rcurry for the common cases where
you only want to curry arguments on the left or right. There are also
compose, complement, disjoin, conjoin and always. These functions are all
basically syntactic sugar for some common simple function manipulations.
They are included in the language spec in order to provide the
opportunity for compiler optimizations.
BTW, I've been using Python the past couple of weeks. Though it's nice in
many ways (read: libraries), it just makes me appreciate Dylan (the
language) even more.
Scott Ribe
scott_ribe@killerbytes.com
http://www.killerbytes.com/
(303) 665-7007 voice
References: