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. Assume that the cards do not have suits on them, so there is no way to tell apart those of the same number.
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. Thus, a configuration may look like 1 + 1 + 1 + 1.
1 + 2 * 3 + 4
1 + (2 * (3 + 4))
Problem: Write a program to 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.