Class: Dhall::Builtins::Natural_build

Inherits:
Dhall::BuiltinFunction show all
Defined in:
lib/dhall/builtins.rb

Instance Method Summary collapse

Methods inherited from Dhall::BuiltinFunction

#as_json, #call, #unfill

Methods inherited from Dhall::Builtin

#as_json

Methods inherited from Expression

#&, #*, #+, #annotate, #as_dhall, #cache_key, #call, #concat, decode, #deep_merge, #deep_merge_type, #dhall_eq, #digest, #fetch, #merge, #normalize, #resolve, #shift, #slice, #substitute, #to_binary, #to_cbor, #to_proc, #to_s, #|

Instance Method Details

#fusion(arg, *bogus) ⇒ Object



77
78
79
80
81
82
83
84
85
# File 'lib/dhall/builtins.rb', line 77

def fusion(arg, *bogus)
	if bogus.empty? &&
	   arg.is_a?(Application) &&
	   arg.function == Natural_fold.new
		arg.argument
	else
		super
	end
end