3 ms·
You do, and you'll have to use do destructive updates within either ST or IO monad using their respective single variable or array types. It looks roundabouty,
by kreetx 2y ago
You do, and you'll have to use do destructive updates within either ST or IO monad using their respective single variable or array types. It looks roundabouty, but does do the thing you want and it is fast.
ST and IO are "libraries" though, in the sense that they not special parts of the language, but appear like any other types.