diff --git a/docs/langs/explicit-substitution/reduce/doAp.cic b/docs/langs/explicit-substitution/reduce/doAp.cic index 9bf6426b..675d9029 100644 --- a/docs/langs/explicit-substitution/reduce/doAp.cic +++ b/docs/langs/explicit-substitution/reduce/doAp.cic @@ -3,7 +3,7 @@ import { Mod } from "../mod/Mod.cic" import { reduce } from "./reduce.cic" export function doAp(mod: Mod, target: Exp, arg: Exp): Exp { - match (target) { + match target { case Exp::Fn(name, ret) => reduce(mod, Exp::Let([new Binding(name, arg)], ret)) diff --git a/docs/langs/explicit-substitution/reduce/reduce.cic b/docs/langs/explicit-substitution/reduce/reduce.cic index d100e627..3c96e271 100644 --- a/docs/langs/explicit-substitution/reduce/reduce.cic +++ b/docs/langs/explicit-substitution/reduce/reduce.cic @@ -7,8 +7,8 @@ import { substitute } from "./substitute.cic" // but it will always remove `Let`. export function reduce(mod: Mod, exp: Exp): Exp { - match (exp) { - case Exp::Var(name) => match (modFind(mod, name)) { + match exp { + case Exp::Var(name) => match modFind(mod, name) { case Maybe::Just(defintion) => exp case Maybe::Nothing() => reduce(mod, defintion.exp) } diff --git a/docs/langs/explicit-substitution/reduce/substitute.cic b/docs/langs/explicit-substitution/reduce/substitute.cic index 82e5619f..ffdc08e2 100644 --- a/docs/langs/explicit-substitution/reduce/substitute.cic +++ b/docs/langs/explicit-substitution/reduce/substitute.cic @@ -6,11 +6,11 @@ export function substitute( bindings: List(Binding), body: Exp, ): Exp { - match (body) { - case Exp::Var(name) => match (lookup(name, bindings)) { - case Maybe::Just(exp) => exp - case Maybe::Nothing() => body - } + match body { + case Exp::Var(name) => match lookup(name, bindings) { + case Maybe::Just(exp) => exp + case Maybe::Nothing() => body + } case Exp::Fn(name, ret) => { let freshName = freshen(name)