From b304772928da5a4c54f0ad17fa4cf232d1752836 Mon Sep 17 00:00:00 2001 From: John David Pressman Date: Sat, 12 Oct 2019 12:38:05 -0700 Subject: [PATCH] Change set patch to use left fold --- src/passes/2-simplify/pascaligo.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/passes/2-simplify/pascaligo.ml b/src/passes/2-simplify/pascaligo.ml index 0674a3caa..92f8c14aa 100644 --- a/src/passes/2-simplify/pascaligo.ml +++ b/src/passes/2-simplify/pascaligo.ml @@ -808,9 +808,9 @@ and simpl_single_instruction : Raw.single_instr -> (_ -> expression result) resu match inj with | [] -> e_skip ~loc () | _ :: _ -> - let assigns = List.fold_right - (fun hd s -> e_constant "SET_ADD" [hd ; s]) - inj (e_accessor ~loc (e_variable name) access_path) in + let assigns = List.fold_left + (fun s hd -> e_constant "SET_ADD" [hd ; s]) + (e_accessor ~loc (e_variable name) access_path) inj in e_assign ~loc name access_path assigns in return_statement @@ expr )