Advertisement
Guest User

Untitled

a guest
Sep 4th, 2010
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. use v6;
  2.  
  3. sub prob12 (@a) {
  4. @a.map: {
  5. $_.isa(Array) ?? $_[1] xx $_[0] !! $_;
  6. }
  7. }
  8.  
  9. my @l = ([4,'a'],'b',[2,'c'],[2,'a'],'d',[4,'e']);
  10.  
  11. say ~@l;
  12. prob12(@l).perl.say;
  13.  
  14. # vim:filetype=perl6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement