module Klam::Primitives::Lists

Constants

EMPTY_LIST

Public Instance Methods

cons(head, tail) click to toggle source
# File lib/klam/primitives/lists.rb, line 6
def cons(head, tail)
  ::Klam::Cons.new(head, tail)
end
cons?(l) click to toggle source
# File lib/klam/primitives/lists.rb, line 18
def cons?(l)
  l.instance_of?(::Klam::Cons)
end
hd(l) click to toggle source
# File lib/klam/primitives/lists.rb, line 10
def hd(l)
  l.hd
end
tl(l) click to toggle source
# File lib/klam/primitives/lists.rb, line 14
def tl(l)
  l.tl
end