Re: any?

2015-04-26 Thread Isaac Zeng
some On Sunday, April 26, 2015 at 9:32:09 AM UTC+8, Colin Taylor wrote: > > Any reason why we don't have `any?`. Googled without much luck. > Trivially done as `comp boolean some` not doubt, but I know I use it more > than not-any at least. > It's particularly useful as a composable `or`. > > >

Re: any?

2015-04-26 Thread Mark Engelberg
The main use case for the non-boolean aspect of `some` is when you use it to find the first element of a sequence that is in a particular set. (some #{} []) The idea is that when you get a "hit", the return value is the specific element of the *set* that matched. This is a useful trick f

Re: any?

2015-04-26 Thread James Reeves
On 26 April 2015 at 06:08, Colin Taylor wrote: > So I was thinking of: > > user=> (any? true? [false true false]) > true > user=> (any? even? [1 2 3]) > true > ; touch "3" > user=> (any? #(.exists %) [(file "1") (file "2") (file "3")]) > true > Those examples all work with `some` as well: user=

Re: Performance of defmulti in both ClojureScript and Clojure

2015-04-26 Thread Ivan Reese
Thanks for that great rundown, Alex! I am also very interested in how the different approaches to dynamic dispatch compare in CLJS, if anyone is able to shed some light on that. Especially, whether or not case is const time — the doc string says it is, but your comments seem to suggest that it

Re: any?

2015-04-26 Thread Colin Taylor
Oh uggh wheres the delete post button. I'll blame the 3 mth old with reflux for that. On Monday, April 27, 2015 at 12:56:04 AM UTC+12, James Reeves wrote: > > Those examples all work with `some` as well: > > user=> (some true? [false true false]) > true > user=> (some even? [1 2 3]) > true > use

Re: ANN: ClojureScript 0.0-3211

2015-04-26 Thread Jacob Goodson
Hey Davis, would you mind replying to this topic? Thanks! https://groups.google.com/forum/#!topic/clojure/7oROqb6dGSU On Saturday, April 25, 2015 at 7:12:31 PM UTC-4, David Nolen wrote: > > You need to make sure some other dependency isn't pulling in a different > version of tools.reader. > > D

Re: ANN: ClojureScript 0.0-3211

2015-04-26 Thread Jacob Goodson
Hey David, would you mind replying to this topic? Thanks! https://groups.google.com/forum/#!topic/clojure/7oROqb6dGSU Dang typo! On Saturday, April 25, 2015 at 7:12:31 PM UTC-4, David Nolen wrote: > > You need to make sure some other dependency isn't pulling in a different > version of tools.r

Re: Performance of defmulti in both ClojureScript and Clojure

2015-04-26 Thread David Nolen
Nearly all the performance notes about Clojure multimethods apply to ClojureScript. On Saturday, April 25, 2015, Alex Miller wrote: > I should say all of that is for Clojure and likely bears no similarity to > the nuances in ClojureScript. > > On Saturday, April 25, 2015 at 9:39:06 PM UTC-5, Ale

[ANN] Ring-swagger 0.20.0, Compojure-api 0.20.0 & other schema/web libs

2015-04-26 Thread Tommi Reiman
Hi all, We here at Metosin have been developing some open source libs, mostly stuff related to web. Most of the libs have got big new releases lately, so though of promoting them here too. Here goes: * *Ring-Swagger 0.20.0* (https://github.com/metosin/ring-swagger) - support lib for generatin