module SchemeBooleansHelper

Scheme booleans helper

Public Instance Methods

if_helper(expr, other) click to toggle source
# File lib/lisp/interpreter/core/boolean.rb, line 15
def if_helper(expr, other)
  if expr == FALSE
    if_idx_helper other
  else
    other
  end
end
if_idx_helper(other) click to toggle source
# File lib/lisp/interpreter/core/boolean.rb, line 5
def if_idx_helper(other)
  if other[0] == '('
    idx = find_bracket_idx other, 0
    other[idx + 1..-1]
  else
    _, other = find_next_value other
    other
  end
end