On Feb 11, 4:06 pm, Phil Hagelberg wrote:
> I think that the bike shed should definitely be red.
I hadn't heard that one before :)
Issue here: http://code.google.com/p/clojure-contrib/issues/detail?id=29
-Jason
--~--~-~--~~~---~--~~
You received this message b
Jason Wolfe writes:
> OK, fine. Any objections to "shuffle" and "rand-elt", to parallel "rand-int"?
I think that the bike shed should definitely be red.
=)
-Phil
(http://en.wikipedia.org/wiki/Color_of_the_bikeshed)
--~--~-~--~~~---~--~~
You received this mes
OK, fine. Any objections to "shuffle" and "rand-elt", to parallel
"rand-int"?
On Feb 11, 2009, at 3:42 PM, Jeffrey Straszheim wrote:
> "shuffle" seems perfectly fine. We *know* you aren't modifying it
> in place, after all.
>
> Is there any reason we can't name random-element something lik
"shuffle" seems perfectly fine. We *know* you aren't modifying it in place,
after all.
Is there any reason we can't name random-element something like random-elem
? I think that is a fine compromise.
On Wed, Feb 11, 2009 at 6:37 PM, Jeff Valk wrote:
>
> - Original Message -
> From: Ph
- Original Message -
From: Phil Hagelberg
Sent: Wednesday 11 February 2009 13:16
>
> Jason Wolfe writes:
>
> >> Would you consider changing the names of these 2 functions ?
> >>
> >> random-permutation -> shuffle
> >> random-element -> one-of
> >>
> >> Shorter names are a trademark of
Jason Wolfe wrote:
> You're right, they should probably live in seq_utils.clj instead.
> I'll post an issue to move them.
>
> If anyone has strong feelings about names, now would be a good time to
> air them. My inclination is to leave the names as they are now; while
> "shuffle" is the na
You're right, they should probably live in seq_utils.clj instead.
I'll post an issue to move them.
If anyone has strong feelings about names, now would be a good time to
air them. My inclination is to leave the names as they are now; while
"shuffle" is the name for the Java "random-permut
I was a bit surprised that random-permutation is in lazy-seqs.. there
doesn't seem to be much lazy about it, right? It is just java's
shuffle.
On Feb 11, 8:16 pm, Phil Hagelberg wrote:
> Jason Wolfe writes:
> >> Would you consider changing the names of these 2 functions ?
>
> >> random-permutat
Jason Wolfe writes:
>> Would you consider changing the names of these 2 functions ?
>>
>> random-permutation -> shuffle
>> random-element -> one-of
>>
>> Shorter names are a trademark of clojure.
>> "one-of" was taken straight from paip =)
>
> I'd be OK with shuffle, I guess, but I don't know if
> Would you consider changing the names of these 2 functions ?
>
> random-permutation -> shuffle
> random-element -> one-of
>
> Shorter names are a trademark of clojure.
> "one-of" was taken straight from paip =)
I'd be OK with shuffle, I guess, but I don't know if one-of is
descriptive enough
I can see arguments either way. Certainly for the core library, short names
are a plus. We don't want to litter our code with (get-first-element-of-seq
x), but for less common routines from the libraries, the longer names may
help readability a lot.
On Wed, Feb 11, 2009 at 6:46 AM, Phlex wrote:
Jason Wolfe wrote:
> Not yet, but perhaps soon. Code is here:
>
> http://code.google.com/p/clojure-contrib/issues/detail?id=8
>
> -Jason
>
Would you consider changing the names of these 2 functions ?
random-permutation -> shuffle
random-element -> one-of
Shorter names are a trademark of c
Not yet, but perhaps soon. Code is here:
http://code.google.com/p/clojure-contrib/issues/detail?id=8
-Jason
On Feb 7, 8:51 am, Jeffrey Straszheim
wrote:
>
> Is there a function, perhaps in contrib somewhere, when given a collection,
> returns a single random element?
>
--~--~-~--~--
Is there a function, perhaps in contrib somewhere, when given a collection,
returns a single random element?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to cloj
14 matches
Mail list logo