On Jan 14, 12:01 am, GS <gsincl...@gmail.com> wrote:
> On Jan 14, 2:27 pm, "Mark Engelberg" <mark.engelb...@gmail.com> wrote:
>
> > I also find the choice of some/not-any? as opposites to be hard to
> > remember.  I'd rather it be some/not-some? or any/not-any?
>
> I think some and any? both have their place.
>
> (let [foo  (some prime? numseq)]
>   (do something with foo))
>
> (if (any? composite? numseq)
>   ; we haven't finished factorising
>
> That is hastily made-up pseudocode, of course.  The point it: 'any?
> looks like a predicate, as it should.  'some doesn't, so it's a
> nuisance when it is used as a predicate.
>
> Personally, I'd prefer 'some be called 'find or 'find-first, but I'm
> not arguing in favour of that; that's simply a preference.
>
> Gavin

+1

I think some consistency is in order.  This would both: a) Help
beginners find the duality of a given function more easily, and b)
Make the code read better, IMHO.

-Ryan
--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to