There is the classic "Purely Functional datastructures" by Okasaki. I
haven't read it, the examples are in standard ML if I remember correctly.

CTM, Concepts Techniques and Models of Computer Programming, develops
datastructures and algorithms above a functional core. I haven't read it
front to end to know if it presents algorithms, but I know it covers all
major paradigms, concepts of virtual machines, threads, memory consumption
and management, garbage collection, etc. I've followed the Course on edx.com
by Peter Van Roy and had a lot of fun (yeah, really). Coming from Clojure,
I felt at home with the functional paradigm presented, and could focus on
the big picture that was presented there.

Then lots of books will, I guess, present versions of algorithms in impure
/ imperative forms. It was quite interesting to see how to tweak the
original union-find algorithm to use pre-existing clojure datastructures.
My guess is that generally you'll have to use maps instead of arrays (in
the case of union-find, it then creates a less optimized algorithms, but a
more generic one where keys/site can be any value, not just array indices).
And then see when you can replace index-based algorithms with reduce/fold
applications.

I would be happy to learn about such books








2014-09-08 22:14 GMT+02:00 Evan Zamir <zamir.e...@gmail.com>:

> Thanks I'll check it out! Is your sense that there really isn't a book
> that fits this target right now?
>
> On Monday, September 8, 2014 12:45:46 PM UTC-7, Laurent PETIT wrote:
>>
>> Shameless plug (and not really answering the question):
>>
>> I've created a version of union-find, inspired by the mentioned library,
>> but using the vocabulary of the course, pure datastructures (and a harmless
>> volatile to transparently implement path reduction).
>>
>> I've also tried to document the readme as clearly as possible:
>>
>> https://github.com/laurentpetit/union-find/blob/master/README.md
>>
>> Le lundi 8 septembre 2014, Evan Zamir <zamir...@gmail.com> a écrit :
>>
>> (First, I should say that I am not an undergrad, haven't been for almost
>>> two decades! But in terms of my CS knowledge, that's pretty much where I
>>> am.)
>>>
>>> I recently started reading Sedgewick's Algorithms book ("the red one")
>>> and am at least making an attempt to follow along with his Coursera course.
>>> As someone who has also been trying to learn Clojure, it struck me that it
>>> would be great to have a resource/book on functional versions of all the
>>> same algorithms. I know there are Clojure implementations of many, if not
>>> all, of the algorithms in the book (for example I found an implementation
>>> of union-find <https://github.com/jordanlewis/data.union-find> on
>>> github), but it would be nice to have a self-contained functional version
>>> of an "Algorithms" book.
>>>
>>> I guess my question boils down to this. Is there a functional algorithms
>>> book aimed at the beginning/intermediate CS undergraduate curriculum? If
>>> not, seems to me that would be a big hole that needs to be filled.
>>> -evan
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clojure@googlegroups.com
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Laurent Petit
>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Laurent Petit

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to