On Thu, Aug 02, 2007 at 04:48:30AM +0900, dohzya wrote:
> 
> Do you want something like this  :
> ---
> def sendif( args, &bloc )
>   if args[:if]
>     send args[:then].shift, *args[:then], &bloc
>   else
>     send args[:else].shift, *args[:else], &bloc if args[:else]
>   end
> end
> 
> sendif :if => 1 < 2, :then => [:p, "gagne"], :else => [:puts, "perdu"]
> ---
> ?

Damn, that's elegant!

  Bas

-- 
Bas van Gils <bas / van-gils.org>, http://www.van-gils.org
[[[ Thank you for not distributing my E-mail address ]]]

Quod est inferius est sicut quod est superius, et quod est superius est sicut
quod est inferius, ad perpetranda miracula rei unius.