Damian Conway wrote: 
 : >   or
 : > 
 : >   given ( "/home/temp/", $f )
 : >      -> ( str $x ,   int $n ) {
 : >          $x ~ ["one, "two", ... , "hundreed"][$n]
 : >         };
 : >  
 : >   it seems that the last does not work because given take only one argument.
 : 
 : That's right. But this does:
 : 
 :      for "/home/temp/",   $f
 :       ->   str $x ,     int $n {
 :             $x ~ ["one, "two", ... , "hundreed"][$n]
 :      }
 : 
 : Damian

except that it will not tolerate list in block signature 

      for "/home/temp/",      @f
        ->   str $x ,     int @y {
                       ...
       }

am I right ? 

Now it will be 
  
      given ["/home/temp/",   @f    ]
        ->  [ str $x ,     int @y   ]{
                       ...
       }

? 



arcadi 

Reply via email to