Class: Skeem::SkmEmptyList
Overview
From R7RS: The empty list is a special object of its own type.
It is not a pair, it has no elements, and its length is zero.
Instance Attribute Summary
Attributes inherited from SkmElement
#position
Instance Method Summary
collapse
Methods inherited from SkmElement
#boolean?, #bound!, #callable?, #char?, #complex?, #done!, #eqv?, #inspect, #integer?, #number?, #procedure?, #quoted!, #rational?, #real?, #skm_eq?, #string?, #symbol?, #unquoted!, #vector?
Instance Method Details
#accept(aVisitor) ⇒ Object
Part of the 'visitee' role in Visitor design pattern.
62
63
64
|
# File 'lib/skeem/skm_empty_list.rb', line 62
def accept(aVisitor)
aVisitor.visit_empty_list(self)
end
|
#append_list(aList) ⇒ Object
48
49
50
|
# File 'lib/skeem/skm_empty_list.rb', line 48
def append_list(aList)
aList
end
|
#empty? ⇒ Boolean
28
29
30
|
# File 'lib/skeem/skm_empty_list.rb', line 28
def empty?
true
end
|
#evaluate(_runtime) ⇒ Object
52
53
54
|
# File 'lib/skeem/skm_empty_list.rb', line 52
def evaluate(_runtime)
self
end
|
#klone ⇒ Object
44
45
46
|
# File 'lib/skeem/skm_empty_list.rb', line 44
def klone
self
end
|
#length ⇒ Object
24
25
26
|
# File 'lib/skeem/skm_empty_list.rb', line 24
def length
0
end
|
#list? ⇒ Boolean
12
13
14
|
# File 'lib/skeem/skm_empty_list.rb', line 12
def list?
true
end
|
#null? ⇒ Boolean
16
17
18
|
# File 'lib/skeem/skm_empty_list.rb', line 16
def null?
true
end
|
#pair? ⇒ Boolean
20
21
22
|
# File 'lib/skeem/skm_empty_list.rb', line 20
def pair?
false
end
|
#quasiquote(_runtime) ⇒ Object
56
57
58
|
# File 'lib/skeem/skm_empty_list.rb', line 56
def quasiquote(_runtime)
self
end
|
#skm_equal?(other) ⇒ Boolean
36
37
38
|
# File 'lib/skeem/skm_empty_list.rb', line 36
def skm_equal?(other)
equal?(other)
end
|
#to_a ⇒ Object
40
41
42
|
# File 'lib/skeem/skm_empty_list.rb', line 40
def to_a
[]
end
|
#verbatim? ⇒ Boolean
32
33
34
|
# File 'lib/skeem/skm_empty_list.rb', line 32
def verbatim?
true
end
|