module Klam::Primitives::BooleanOperations

All of the boolean operations are special forms, but if, and, and or are also available as normal functions to facilitate partial application. When partially applied, they are no longer short circuiting.

Public Instance Methods

'if'(a, b, c)
Alias for: _if
_if(a, b, c) click to toggle source
# File lib/klam/primitives/boolean_operations.rb, line 7
def _if(a, b, c)
  a ? b : c
end
Also aliased as: 'if'
and(a, b) click to toggle source
# File lib/klam/primitives/boolean_operations.rb, line 13
def and(a, b)
  a && b
end
or(a, b) click to toggle source
# File lib/klam/primitives/boolean_operations.rb, line 17
def or(a, b)
  a || b
end