Skip to content

Instantly share code, notes, and snippets.

@artyil
Created August 30, 2017 16:03
Show Gist options
  • Save artyil/ed439dcad0f7cc12186f8a85112a5db6 to your computer and use it in GitHub Desktop.
Save artyil/ed439dcad0f7cc12186f8a85112a5db6 to your computer and use it in GitHub Desktop.
['--','-+','+-','++']
.map( ([sign1,sign2]) => ['-','+'].map( op => `${sign1}Infinity ${op} ${sign2}Infinity`))
.reduce( (perms, next) => [...perms, ...next], [])
.map( perm => `${perm} = ${eval(perm)}`)
.join('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment