3 ms·
There are some change in the pipes that should make the syntax for slicing lighter in OCaml 4.10 by eliminating the need of the outermost [| |] or [ ]. For inst
by octachron 7y ago
There are some change in the pipes that should make the syntax for slicing lighter in OCaml 4.10 by eliminating the need of the outermost [| |] or [ ]. For instance,
let a = x.%{ [|2; 3; 4|] }
x.%{ [|2; 3; 4|] } <- 111.
let a = x.${ [[0;4]; [6;-1]; [-1;0]] }
might be simplified to:
let a = x.%{ 2; 3; 4 }
x.%{ 2; 3; 4 } <- 111.
let a = x.${ [0;4]; [6;-1]; [-1;0] }
It is possible to go further with ppxs(OCaml version of macros), but at a greater readability cost.