 oldParam has been shadowed in this case
substitute (LcApp fn arg) param new = LcApp (substitute fn param new) (substitute arg param new)

substitute (LcApp fn arg) param new = LcApp (substitute fn param new) (substitute arg param new)
substitute (LcApp fn arg) param new = LcApp (substitute fn param new) (substitute arg param new)