On Tue, Sep 6, 2011 at 7:32 PM, julianrz <julia...@yahoo.com> wrote: > I come from Scala experience, where it is easy to define a quick > lambda function returning a constant or another simple expression, > e.g. "=> true" is a function with no args and returning true. Things > like that are sometimes useful to pass into higher-order functions > expecting a function, not a constant. I guess I should forgo the macro > and go directly with (fn [] true)
Have you tried (constantly true)? The main difference is that it will ignore all arguments, but perhaps it's a more concise way of expressing what you want. -Phil -- 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