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_jsonObject



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

#eachObject



435
436
437
# File 'lib/dhall/ast.rb', line 435

def each
	self
end

#firstObject



451
452
453
# File 'lib/dhall/ast.rb', line 451

def first
	OptionalNone.new(value_type: element_type)
end

#lastObject



455
456
457
# File 'lib/dhall/ast.rb', line 455

def last
	OptionalNone.new(value_type: element_type)
end

#lengthObject



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

#normalizeObject



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

#reverseObject



459
460
461
# File 'lib/dhall/ast.rb', line 459

def reverse
	self
end