Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can escape the purely functional part (to do IO for example). This library does however provide 2 implementations: one in the IO monad and one in the ST monad.

If you use the IO monad one then you can do whatever side effects you want. It's up to you to use the rest of the code in a responsible way (which means that you can write code C style if you want).

The ST monad version is quite nice, it lets you use the hash table as if it was modifiable, but only inside the ST monad. Looking at it from the outside, it's still purely functional, and within the ST monad you're restricted to purely functional programming and the facilities provided by the ST monad. This makes it a safe alternative when you want to use a hash table for performance reasons but still want to limit what side effects that can be used.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: