Outcome

com.phasmidsoftware.gambit.examples.tictactoe.`package`.Outcome
implicit class Outcome(x: Option[Int])

Implicit class Outcome which allows for two Option[Int] values to be combined.

NOTE: currently this class is not used.

Value parameters

x

an Option[Int] on the left of the &

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def &(y: => Option[Int]): Option[Int]

Combine x and y in such a way that x & None = None & x = x. Some(-1) yield x without evaluating y. But Some(x) & Some(y) give None if x != y otherwise Some(x).

Combine x and y in such a way that x & None = None & x = x. Some(-1) yield x without evaluating y. But Some(x) & Some(y) give None if x != y otherwise Some(x).

Value parameters

y

another Option[Int] (on the right of the &)

Attributes

Returns

an Option[Int]