> On Fri, Jan 23, 2009 at 8:49 PM, Chouser <chou...@gmail.com> wrote:
>> This is the best version?
>
> Depends on your definition of "best".
>
> I just posted a version at http://paste.lisp.org/display/74134 which
> is many times faster.

I haven't had a chance to look at that in detail yet, but I'm 100% in
favor of faster.

> Also, I have to say that calling this function "combinations" is
> fairly nonstandard.  Usually combinations refers to all the ways of
> taking n elements from a given collection.
>
> So (combinations [1 2 3] 2) would give you back ((1 2) (1 3) (2 3)).

That had nagged me a bit too ... I agree.

> selections seems like a better name to me for this particular function.

I think the usual mathematical name is be cartesian-product (or maybe
cross-product), although selections is OK with me too.

-Jason




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