One of the best examples of partial that I've seen is in the debug-repl...look it up on github and see how it is being used there in the main function that starts the debug repl...basically every time you invoke the debug-repl within the same repl session you're going to have different local bindings...so partial takes care of returning a function that has all your bindings "precollected"...I don't know if I'm saying this right...if you leave the debug-repl but some time afterwards you want to enter it again your locals will be re-bound to your current ones...

Hope that helps...

Jim

On 16/05/12 18:57, Murtaza Husain wrote:
Hi,

What is the idiomatic use of partial. I understand it helps create closures, however the reader notation also allows to the same. So when should partial be use dover other forms of creating functions.

Thanks,
Murtaza

--
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 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

Reply via email to