Last active
November 11, 2018 00:51
-
-
Save jjant/bd394412cd280c9b0d1f0cb0030a7bc1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkFizzBuzz :: (v -> Either pf pt) -> (v -> Either rf rt) -> v -> FizzResult v pt pf rt rf | |
| mkFizzBuzz p1 p2 v = | |
| case (p1 v, p2 v) of | |
| (Right pt, Right rt) -> FizzBuzz pt rt | |
| (Right pt, Left rf) -> Fizz pt rf | |
| (Left pf, Right rt) -> Buzz pf rt | |
| (Left pf, Left rf) -> Val v pf rf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment