[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:04128] Re: Function objects. was: What are you usi ng Ruby for?

From: Aleksi Niemel<aleksi.niemela@...>
Date: 2000-07-19 13:03:17 UTC
List: ruby-talk #4128
Kjana:
> >   Parameter passing   all supported ways        only plain  (*)
> (snip)
> >   *) no optional, grouped (*rest) or named parameters allowed, 
> >      nor block block association
> 
> Parameters for a block is bound as multiple assignment. Therefore you
> can:
> 
>     <code>
>     f = proc { |x, *y| p x, y }

Yes, you're right. Thank you for the correction. parse.y's rules for mlhs
(multiple (assigment) left hand side) shows all the available ways to "pass
parameters" to a block.

	- Aleksi

In This Thread

Prev Next