/numbers-game

Primary LanguageHaskellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

number-game

The only file worth anything is fours.hs

The solve function takes a list of numbers and a single number and returns all the ways that list can be combined with basic arithmetic into that single number.

Input: [1,2,3,4] 10

output:

 (1 + 2) + (3 + 4) = 10
 
 (1 * 2 * 3) + 4 = 10
 and so on....

Output will always include parenthesis because any expression without parenthesis can be expressed with them as well.

This is actually a pretty dang hard programming challenge, and my favorite. Give it a try if you want to challenge yourself.