From b916bc896851557e63b46af9aa46793472b97da7 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 11 Mar 2019 19:33:51 +0100 Subject: Fix List/fold implementation --- dhall/src/normalize.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dhall/src') diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs index c8ec310..8948443 100644 --- a/dhall/src/normalize.rs +++ b/dhall/src/normalize.rs @@ -132,10 +132,10 @@ where let e2: Expr<_, _> = xs .into_iter() .rev() - .fold((**nil).clone(), |y, ys| { - let y = bx(y); - let ys = bx(ys); - dhall_expr!(cons y ys) + .fold((**nil).clone(), |acc, x| { + let x = bx(x); + let acc = bx(acc); + dhall_expr!(cons x acc) }); normalize_whnf(&e2) } -- cgit v1.2.3