[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LFM + LFSP = LFE?



Grzegorz ChrupaƂa <grzegorz@pithekos.net> writes:

> On Thu 12 Jun 2003 03:40, Michael Vanier wrote:
> > Note that one of the common features of many of these languages is that
> > they provide lisp-like power with a friendlier syntax.
> 
> True of Ruby, too. Instead of:
> (map (lambda (n) (* n 2)) '(0 1 2 3 4))
> You write:
> [0,1,2,3,4].map{|n| n*2}

Great!  Now people afraid of "()'" can use "[],.{}|" instead!

Hopefully quick question that will help us Scheme afficianados
understand this friendliness better:

What's the Ruby equivalent of this?

(map * '(1 2 3) '(4 5 6))