Skip to content

Instantly share code, notes, and snippets.

Created October 5, 2016 13:38
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 anonymous/ac4518ae1d13a9c1306ca6e66d2bfa05 to your computer and use it in GitHub Desktop.
Save anonymous/ac4518ae1d13a9c1306ca6e66d2bfa05 to your computer and use it in GitHub Desktop.
multi f() { 0 }
multi f($a) { 1 }
multi f($a, $b) { 2 }
multi f($a, $b, $c) { 3 }
say reduce &f, ();
say reduce &f, (10);
say reduce &f, (10, 20);
say reduce &f, (10, 20, 30);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment