I'm a bit unsure whether this is a net win: It saves us one out of several redundant list length computing the parameter length list and a few lines of code, at the expense of arbitrarily breaking symmetry between the different equally long lists.
The nicer way to optimize this might be if Foreign.Marshal exposed something like unsafeWithArray len vals action.
This is the other left-over change from #22.
I'm a bit unsure whether this is a net win: It saves us one out of several redundant list length computing the parameter length list and a few lines of code, at the expense of arbitrarily breaking symmetry between the different equally long lists.
The nicer way to optimize this might be if
Foreign.Marshal
exposed something likeunsafeWithArray len vals action
.