Skip to content

Instantly share code, notes, and snippets.

@butackle
Created October 7, 2017 05:40
Show Gist options
  • Save butackle/2f4173b639f44d0cad85c6dff479ad84 to your computer and use it in GitHub Desktop.
Save butackle/2f4173b639f44d0cad85c6dff479ad84 to your computer and use it in GitHub Desktop.
[...Array(1)].reduce(() => console.log(t([18], [24])), t = (v1, v2) => v1.some((v) => v2.some((vv) => vv === v)) ? v1.find((v) => v2.some((vv) => vv === v)) : t([...v1, v1[0]*(v1.length+1)], [...v2, v2[0]*(v2.length+1)]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment