1 Stage 1
There are no wheats and chaffs for any of the stages of this assignment.
Numbers: 1 to 5. You have four cards of each number (corresponding to the four suits).
Operations: addition and multiplication. You have three cards of each operation.
A configuration consists of seven cards, starting with a number and thereafter alternating operation and number. Each suit occupies a fixed position throughout this game. Thus, a configuration may look like 1 + 1 + 1 + 1.
1 + 2 * 3 + 4
1 + (2 * (3 + 4))
Problem: Determine how many different configurations have the value 24. Implement a function with the signatureThe 24-5-2 stands for “that combine to form 24 choosing from 5 different numbers and 2 different operators”.
how-many-24-5-2 :: () -> Number
that when applied to no inputs computes the number of these configurations.