ズンドコキヨシ with Perl6 gather/take編

  • 4
    Like
  • 0
    Comment
More than 1 year has passed since last update.

http://qiita.com/shunsugai@github/items/971a15461de29563bf90

gather {
  my @a = (1..5).map({''});
  until @a.join("") eq "ズンズンズンズンドコ" {
    @a.shift;
    @a.append: take ("ズン", "ドコ").pick;
  }
  take "キ・ヨ・シ!";
}.say

Perl6 便利