Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- applyTimesExerciseA = applyTimes 5 (+ 1) 5
- applyTimesExerciseB = (+ 1) (applyTimes 4 (+ 1) 5)
- applyTimesExerciseC = (+ 1) ((+ 1) (applyTimes 3 (+ 1) 5))
- applyTimesExerciseD = (+ 1) ((+ 1) ((+ 1) (applyTimes 2 (+ 1) 5)))
- applyTimesExerciseE = (+ 1) ((+ 1) ((+ 1) ((+ 1) (applyTimes 1 (+ 1) 5))))
- applyTimesExerciseF =
- (+ 1) ((+ 1) ((+ 1) ((+ 1) ((+ 1) (applyTimes 0 (+ 1) 5)))))
- applyTimesExerciseG = (+ 1) ((+ 1) ((+ 1) ((+ 1) ((+ 1) (5)))))
- applyTimesExerciseH = (+ 1) ((+ 1) ((+ 1) ((+ 1) ((+ 1) 5))))
- applyTimesExerciseI = (+ 1) ((+ 1) ((+ 1) ((+ 1) 6)))
- applyTimesExerciseJ = (+ 1) ((+ 1) ((+ 1) 7))
- applyTimesExerciseK = (+ 1) ((+ 1) 8)
- applyTimesExerciseL = (+ 1) 9
- applyTimesExerciseM = 10
- checkApplyTimesExercise = foldl (\acc curr -> acc && curr == 10) True
- applyTimesExerciseCorrect =
- checkApplyTimesExercise
- [ applyTimesExerciseA
- , applyTimesExerciseB
- , applyTimesExerciseC
- , applyTimesExerciseD
- , applyTimesExerciseE
- , applyTimesExerciseF
- , applyTimesExerciseG
- , applyTimesExerciseH
- , applyTimesExerciseI
- , applyTimesExerciseJ
- , applyTimesExerciseK
- , applyTimesExerciseL
- , applyTimesExerciseM
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement