Search code examples
rascal

Is there a construct like `Either`/`Validation`?


For my use case I want to have either a successful result (with value) xor a failed result with a list of errors. In Haskell you could use something like Either for this, in Scalaz we have Validation. Is there a construct in Rascal for this?

Is see Maybe is available, I hope Either is as well.


Solution

  • At the moment we only support Maybe in the library, but you could easily write your own Either if you want. Could be a useful addition to our library.