Let's say I have a function that takes some int parameters, but inside which I will use float32.
I'd prefer not to use the float32 i function everywhere.
Instead, I want to do this:
let x = float32 x
let y = float32 y
let w = float32 w
let h = float32 h
To tighten it up a bit, I could do this:
let x, y, w, h = float32 x, float32 y, float32 w, float32 h
I'd like to do this:
let [x;y;w;h] = List.map float32 [x;y;w;h]
This works, but I get a compiler warning of Incomplete pattern matching on this expression, because there is no static check that the rhs will have exactly 4 items (could be empty, could have 1 item, could have a thousand).
I don't want to disable the compiler warning.
Is this just a bad idea? Should I ignore the compiler warning in this one case, or is there some nice, idiomatic way to do it?