Last active
August 29, 2015 14:04
-
-
Save OleTraveler/cd0a8b682dc78dd4e91e 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
def maxTen(i: Int) = | |
if (i <= 10) \/-(i) | |
else "Must be less than ten" | |
def divisibleByTwo(i: Int) = | |
if (i % 2 == 0) == 0 \/-(i) | |
else "Must be divisable by two" | |
def whatType(input: Int): ???[NonEmptyList[String], Int] = | |
( parseInt(input) |@| divisibleByTow(input) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment