Tim
Tim

Reputation: 221

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.

Upvotes: 1

Views: 70

Answers (1)

Paul Klint
Paul Klint

Reputation: 1406

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.

Upvotes: 2

Related Questions