Change set patch to use left fold
This commit is contained in:
parent
c2a3fd473c
commit
b304772928
@ -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
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user