4 ms·
A lot of imperative algorithms don't really have functional analogues. Sometimes you need to mutate in place to achieve optimal algorithmic complexity. That sa
by ummonk 8y ago
A lot of imperative algorithms don't really have functional analogues. Sometimes you need to mutate in place to achieve optimal algorithmic complexity.
That said, I think this might be what you're looking for: https://cs.uwaterloo.ca/~plragde/flaneries/FDS/ https://cs.uwaterloo.ca/~plragde/flaneries/FDS/
- qwerty456127 8y ago> A lot of imperative algorithms don't really have functional analogues. But there are to be the ways functional programmers solve the same task? Thank you for the link.
- disgruntledphd2 8y agoDefinitely. But unless special care is taken, these will use (normally) more space, and potentially more time. I think Chris Osaki did a bunch of work on functional data structures for handling immutability efficiently (still less efficiently) and that some of this was implemented in Clojure.
- ascar 8y agoFunctional programming is not supposed to be a golden hammer. That's the pragmatic solution for this problem ;).
- Puer 8y agoNice resource, thank you for sharing. It's been a why since I've used Ocaml but this will be a good opportunity to review.