Typing fixes this, and anonymous records make it even better.
JavaScript lacks typing, and then they decided on a weird signature for the callback...
JavaScript lacks typing, and then they decided on a weird signature for the callback...
It's a very nasty issue to debug.
It would look like this
newtype Radix = Radix { radixToWord :: Word }
newtype Index = Index { indexToWord :: Word }
[0]: https://wiki.haskell.org/Newtype