Skip to content

Instantly share code, notes, and snippets.

@gfldex
Created July 28, 2016 11:07
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 gfldex/491d637082df050f825f8a7adcd2746c to your computer and use it in GitHub Desktop.
Save gfldex/491d637082df050f825f8a7adcd2746c to your computer and use it in GitHub Desktop.
multi cross(&f, @ ($x, *@xs), @ys) { flat map({&f($x, $_)}, @ys), cross(&f, @xs, @ys); }
multi cross(&f, @ (), @ys) { (); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment