Created
October 16, 2014 14:11
-
-
Save erikkaplun/15911794af75dec5258d 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
// have | |
val params = ( | |
(postalCode |> notNone("postal code missing")) |@| | |
(countryCode |> notNone("country code missing")).flatMap(validIso2CountryCode("country code invalid")) | |
) | |
// would like | |
val params = ( | |
(postalCode |> notNone("postal code missing")) |@| | |
(countryCode |> (notNone("country code missing") ==> validIso2CountryCode("country code invalid"))) | |
) | |
// ...where ==> is currently flatMap but that's beyond the idea here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment