Exemple #1
0
 def is_left(self) -> 'amino.Boolean':
     return boolean.Boolean(isinstance(self, Left))
Exemple #2
0
 def left_contains(self, a: A) -> 'boolean.Boolean':
     return boolean.Boolean(self.is_left and self.__left_value == a)
Exemple #3
0
 def is_right(self) -> 'amino.Boolean':
     return boolean.Boolean(isinstance(self, Right))
Exemple #4
0
 def is_just(self) -> boolean.Boolean:
     return boolean.Boolean(isinstance(self, Just))
Exemple #5
0
 def is_empty(self) -> 'boolean.Boolean':
     return boolean.Boolean(self.length == 0)
Exemple #6
0
 def contains(self, value: A) -> 'boolean.Boolean':
     return boolean.Boolean(value in self)
Exemple #7
0
 def forall(self, f: Callable[[A], bool]) -> 'boolean.Boolean':
     return boolean.Boolean(all(f(el) for el in self))