You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jan Groothuijse (JIRA)" <ji...@apache.org> on 2019/05/03 12:21:00 UTC

[jira] [Created] (LANG-1456) Add Either type in tuples

Jan Groothuijse created LANG-1456:
-------------------------------------

             Summary: Add Either type in tuples
                 Key: LANG-1456
                 URL: https://issues.apache.org/jira/browse/LANG-1456
             Project: Commons Lang
          Issue Type: New Feature
          Components: lang.tuple.*
    Affects Versions: 4.0
         Environment: Implementations exist in the standard library of functional languages:
 * Haskell
[http://hackage.haskell.org/package/base-4.12.0.0/docs/Data-Either.html]
 * Scala
[https://www.scala-lang.org/api/2.9.3/scala/Either.html]
            Reporter: Jan Groothuijse


A Pair holds left *and* right, an Either holds left *or* right. Either is the dual of Pair.

 

Either applies transformations conditionally, like optional. So that, like using optional, you do not need to check for null etc.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)