Hello Steven, On Friday, December 20, 2013 8:21:29 PM UTC+1, Steven G. Johnson wrote: > > It doesn't seem like your question has anything to do with > homoiconicity---your example is about first-class & higher-order functions. >
Mea culpa. I mixed things up - but fortunatly I got the right answer: I was not wondering about macros et al, but indeed about higher order functions. Thanks for your answer! > > An equivalent definition in Julia would be > > cons(x, y) = m -> m == 0 ? x : m == 1 ? y : throw(BoundsError()) > car(z) = z(0) > cdr(z) = z(1) > > > I understand that "->" defines an anonymous function here, and ":" seperates the definition statements in that function. Cheers! Piotr
