Couldn't it have access to the other bindings so far like let? And then just have the order of options reflect the partial order induced by dependency? So is this possible...
(with-command-line *command-line-args* "my-program" [[size "The size of something" #(if % (Integer/parseInt %) 99)] [picture "Path to Picture" #(load-picture % size)]] (do-stuff-with-picture)) Also, other suggestions might be being able to declare an option or conditional dependencies. Ideally we could have lots of optional keyword arguments :default, :required, :depends, etc... This is probably more heavy than most people use, but I would definitely find it useful. Thanks, Aria > (with-command-line *command-line-args* > > "my-program" > > [[picture "Path to Picture" "/default/path"]] > > (def picture (load-picture picture)) > > (blah)) > > I usually use the body of with-command-line to simply call other > functions, so it might look more like: > > (with-command-line *command-line-args* > "my-program" > [[picture "Path to Picture" "/default/path"] > [size "The size of something" "99"]] > (process-picture (load-picture picture) (Integer. size))) > > If each option provided a function, that function wouldn't have access > to any of the other option values, right? How useful would that be? > > --Chouser --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---