I wish there was a built-in for this as well.  I don't know that 
(constantly) is a good name for it though.  I couldn't think of a good 
name, apparently a "null function" means the same as "identity function" so 
that doesn't work.  

On Monday, April 2, 2012 2:39:31 PM UTC-4, Jay Fields wrote:
>
> I often tend to define the following in my apps
>
> (def no-op (fn [& _]))
>
> The other day I noticed constantly
> (
> http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/constantly
> ),
> which is basically the same thing - except I would have to say
> (constantly nil). What do you all think about allowing constantly to
> take no args and constantly return nil?
>
> Or, is there another function that does that and I've just overlooked it?
>
> Cheers, Jay
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to