Skip to content

Instantly share code, notes, and snippets.

@lilobase
Last active January 29, 2016 14:01
Show Gist options
  • Save lilobase/a2584615916d9d95b7f9 to your computer and use it in GitHub Desktop.
Save lilobase/a2584615916d9d95b7f9 to your computer and use it in GitHub Desktop.
const old_sides = (box) => [box[0]*box[1], box[1]*box[2], box[2]*box[0]];
const sides = ([a, b, c], acc = []) =>
(acc.length == 3) ? acc : sides([b, c, a], acc.concat([a * b]));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment