You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We probably didn't bother to look for List.remove_assoc
If I recall correctly, List.map used to be implemented as
let rec map f = function
| [] -> []
| x :: xs -> f x :: map f xs
and then it depends on the byte/native code whether f x or map f xs is evaluated first. Since we used quite some effectful functions f in the implementation, we decided to write our own implementation that guarantees the order of evaluation.
eff/src/utils/assoc.ml
Line 7 in 4c6bc57
Many of the functions in
assoc.ml
can be proxied to OCaml stdlib:Assoc.lookup
=>List.assoc_opt
Assoc.remove
=>List.remove_assoc
Assoc.iter
=>List.iter
(has been done)Assoc.kmap
=>List.map
Assoc.fold_left
=>List.fold_left
(has been done)Assoc.fold_right
=>List.fold_right
(has been done)Assoc.length
=>List.length
(has been done)and so on. Is there a reason these are re-implemented by hand?
The text was updated successfully, but these errors were encountered: