Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #!/usr/bin/env perl6
  2.  
  3. use v6;
  4.  
  5. my @words = Q:w:to/END/.map: *.comb.list;
  6. words
  7. END
  8.  
  9. say (^@words[0].elems).map(-> $i {bag @words.map({$_[$i]})}).map(*.antipairs.sort[*-1].value).join;
  10. say (^@words[0].elems).map(-> $i {bag @words.map({$_[$i]})}).map(*.antipairs.sort[0].value).join;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement