Method: Dhall::Function#substitute
- Defined in:
- lib/dhall/normalize.rb
#substitute(svar, with_expr) ⇒ Object
104 105 106 107 108 109 110 111 112 |
# File 'lib/dhall/normalize.rb', line 104 def substitute(svar, with_expr) with( type: type&.substitute(svar, with_expr), body: body.substitute( var == svar.name ? svar.with(index: svar.index + 1) : svar, with_expr.shift(1, var, 0) ) ) end |