Module: System::Collections::BooleanLambdas
Instance Method Summary collapse
- #and ⇒ Object
- #ands ⇒ Object
- #nand ⇒ Object
- #nor ⇒ Object
-
#not ⇒ Object
booleans.
- #or ⇒ Object
- #ors ⇒ Object
- #xor ⇒ Object
Instance Method Details
#and ⇒ Object
137 138 139 |
# File 'lib/raskell/f.rb', line 137 def and @@and||= ->(x,y) { x && y } end |
#ands ⇒ Object
157 158 159 |
# File 'lib/raskell/f.rb', line 157 def ands @@ands||= ->(x) { x == Nothing } * find_where.(F.equals.(false)) end |
#nand ⇒ Object
141 142 143 |
# File 'lib/raskell/f.rb', line 141 def nand @@nand||= ->(x,y) { !(x && y) } end |
#nor ⇒ Object
149 150 151 |
# File 'lib/raskell/f.rb', line 149 def nor @@nor||= ->(x,y) { !x && !y } end |
#not ⇒ Object
booleans
133 134 135 |
# File 'lib/raskell/f.rb', line 133 def not @@not||= ->(x) { !x } end |
#or ⇒ Object
145 146 147 |
# File 'lib/raskell/f.rb', line 145 def or @@or||= ->(x,y) { x || y } end |
#ors ⇒ Object
161 162 163 |
# File 'lib/raskell/f.rb', line 161 def ors @@ors||= ->(x) { x != Nothing } * find_where.(F.equals.(true)) end |
#xor ⇒ Object
153 154 155 |
# File 'lib/raskell/f.rb', line 153 def xor @@xor||= ->(x,y) { !(x && y) && (x || y) } end |