Class: Dhall::EmptyList
- Inherits:
-
List
show all
- Defined in:
- lib/dhall/ast.rb,
lib/dhall/normalize.rb
Instance Method Summary
collapse
Methods inherited from List
as_dhall, decode, #join, of, #type
Methods inherited from Expression
#&, #*, #+, #as_dhall, #cache_key, #call, decode, #deep_merge, #deep_merge_type, #dhall_eq, #digest, #fetch, #fusion, #merge, #resolve, #shift, #slice, #substitute, #to_cbor, #to_proc, #to_s, #|
Instance Method Details
#[](_) ⇒ Object
447
448
449
|
# File 'lib/dhall/ast.rb', line 447
def [](_)
OptionalNone.new(value_type: element_type)
end
|
#as_json ⇒ Object
427
428
429
|
# File 'lib/dhall/ast.rb', line 427
def as_json
[4, element_type.as_json]
end
|
#concat(other) ⇒ Object
463
464
465
|
# File 'lib/dhall/ast.rb', line 463
def concat(other)
other
end
|
#each ⇒ Object
435
436
437
|
# File 'lib/dhall/ast.rb', line 435
def each
self
end
|
#first ⇒ Object
451
452
453
|
# File 'lib/dhall/ast.rb', line 451
def first
OptionalNone.new(value_type: element_type)
end
|
#last ⇒ Object
455
456
457
|
# File 'lib/dhall/ast.rb', line 455
def last
OptionalNone.new(value_type: element_type)
end
|
#length ⇒ Object
443
444
445
|
# File 'lib/dhall/ast.rb', line 443
def length
0
end
|
#map(type: nil) ⇒ Object
431
432
433
|
# File 'lib/dhall/ast.rb', line 431
def map(type: nil)
type.nil? ? self : with(element_type: type)
end
|
#normalize ⇒ Object
247
248
249
|
# File 'lib/dhall/normalize.rb', line 247
def normalize
super.with(element_type: element_type.normalize)
end
|
#reduce(z) ⇒ Object
439
440
441
|
# File 'lib/dhall/ast.rb', line 439
def reduce(z)
z
end
|
#reverse ⇒ Object
459
460
461
|
# File 'lib/dhall/ast.rb', line 459
def reverse
self
end
|