Skip to content

Instantly share code, notes, and snippets.

@moritz
Created December 10, 2012 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritz/4250553 to your computer and use it in GitHub Desktop.
Save moritz/4250553 to your computer and use it in GitHub Desktop.
stuff that behaves differently in the qast-sink-1 branch
my sub expand($s) {
return $s.list if $s ~~ Iterable|Positional;
gather for $s.comb(/ (\w) '..' (\w) | . /, :match) {
if .[0] {
take $_ for ~.[0] .. ~.[1];
} else {
take ~$_;
}
}
}
say expand("A..BZ-").perl;
say expand("a..c_").perl;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment