Class: Class

Inherits:
Object show all
Includes:
PatternMatch::Matchable
Defined in:
lib/egison/matcher-core.rb

Instance Method Summary collapse

Methods included from PatternMatch::Matchable

#call

Instance Method Details

#uncons(val) ⇒ Object

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/egison/matcher-core.rb', line 15

def uncons(val)
  raise NotImplementedError, "need to define `#{__method__}'"
end

#uncons_stream(val, &block) ⇒ Object

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/egison/matcher-core.rb', line 19

def uncons_stream(val, &block)
  raise NotImplementedError, "need to define `#{__method__}'"
end

#unnil(val) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/egison/matcher-core.rb', line 7

def unnil(val)
  if val.empty?
    [[]]
  else
    []
  end
end