It's not possible because (in this example) F will throw an ArityException if invoked with anything other than four arguments.
'apply' is special in that it invokes the function via 'applyTo<https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/AFn.java#L150>' (which takes a single sequence, and calls invoke under the hood), rather than 'invoke<https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/AFn.java#L34>' (which takes *n* individual arguments). On 5 November 2012 13:35, cej38 <junkerme...@gmail.com> wrote: > No, you don't. I want a command that works INSIDE of f not ON f. The > function that I gave earlier was something overly simple. > > > > > On Monday, November 5, 2012 12:46:24 AM UTC-5, Jerry Peng wrote: > >> If I understand your problem correctly, you could use `apply`. >> >> user=> (defn f [w x y z] (+ w x y z)) >> #'user/f >> user=> (f 1 2 3 4) >> 10 >> user=> (apply f [1 2 3 4]) >> 10 >> >> >> >> -- >> Jerry Peng >> >> >> -- > 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 > -- *Alex Nixon* Software Engineer | SwiftKey *a...@swiftkey.net** | http://www.swiftkey.net/* ++++++ WINNER - MOST INNOVATIVE MOBILE APP<http://www.swiftkey.net/swiftkey-wins-most-innovative-app-at-mwc> - GSMA GLOBAL MOBILE AWARDS 2012 Head office: 91-95 Southwark Bridge Road, London, SE1 0AX TouchType is a limited company registered in England and Wales, number 06671487. Registered office: 21 Lawn Terrace, Blackheath, London, SE3 9LL, United Kingdom. -- 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