heist 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,36 +0,0 @@
1
- module Heist
2
- class Runtime
3
-
4
- class List < Array
5
- include Expression
6
-
7
- def self.from(array)
8
- list = new
9
- array.each { |item| list << item }
10
- list
11
- end
12
-
13
- def <<(element)
14
- element.exists_at!(self, self.size) if Expression === element
15
- super
16
- end
17
-
18
- def []=(index, value)
19
- super
20
- value.exists_at!(self, index) if Expression === value
21
- end
22
-
23
- def rest
24
- self[1..-1]
25
- end
26
-
27
- def to_s
28
- '(' + collect { |cell| cell.to_s } * ' ' + ')'
29
- end
30
-
31
- alias :inspect :to_s
32
- end
33
-
34
- end
35
- end
36
-