On Oct 20, 7:03 am, Parth Malwankar <
parth.malwan...@gmail.com> wrote:
> On Oct 20, 3:51 pm, "Fredrik Appelberg" <
fredrik.appelb...@gmail.com>
> wrote:
>
> > Hi all,
>
> > The CL feature for handling multiple return values from a function come in
> > really handy sometimes and make for cleaner APIs. For example, the ROUND
> > function returns the integer part of a float as the regular value (as this
> > is what you want most of the time), but optionally also returns the floating
> > point part in case you want it.
>
> > I haven't found anything like MULTIPLE-VALUE-BIND in Clojure. Are there any
> > plans of incorporating any kind of mechanism for multiple return values?
>
> Hi Fredrik,
>
> Similar results can be accomplished using vectors and
> destructuring in Clojure.
>
> user=> (defn foo [] [:one :two :three])
> #=(var user/foo)
> user=> (let [[a b c] (foo)] (println b))
> :two
> nil
> user=>
>
> The destructuring capabilities of "let" are quite nice.
> A bunch of examples are available in the let reference:
http://clojure.org/special_forms
>