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
|
match inj with
|
||||||
| [] -> e_skip ~loc ()
|
| [] -> e_skip ~loc ()
|
||||||
| _ :: _ ->
|
| _ :: _ ->
|
||||||
let assigns = List.fold_right
|
let assigns = List.fold_left
|
||||||
(fun hd s -> e_constant "SET_ADD" [hd ; s])
|
(fun s hd -> e_constant "SET_ADD" [hd ; s])
|
||||||
inj (e_accessor ~loc (e_variable name) access_path) in
|
(e_accessor ~loc (e_variable name) access_path) inj in
|
||||||
e_assign ~loc name access_path assigns in
|
e_assign ~loc name access_path assigns in
|
||||||
return_statement @@ expr
|
return_statement @@ expr
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user