On Wednesday, July 20, 2016 at 9:41:59 PM UTC-5, Mars0i wrote:
>
> On Wednesday, July 20, 2016 at 4:32:40 PM UTC-5, Alex Miller wrote:
>>
>> You can file a jira if you like, I'm not sure Rich's thoughts on this. 
>>
>
> I understand.  Thanks--will do.
>  
>
>> Also, keep in mind that you can also compose preds and get this with 
>> slightly more effort now:
>>
>> (s/and (s/double-in :min 0.0 :max 1.0) #(not= 0.0 %))
>>
>
> Yes, definitely.  Though #(and (> % 0.0) (<= % 1)) seems simpler if one 
> doesn't really need the NaN and Infinity tests. 
>

You'll find that the generator for double-in is far better than what you're 
suggesting, and you should lean on it when doing things slightly 
differently. 

I didn't try it but I don't think your example would gen at all - you'd 
need to s/and double? in there too at the beginning and even then it's 
going to generate random doubles then filter to your range, but most 
generated values will not be in the range. s/double-in is designed to only 
generate values in the specified range.
 

>
> Thanks.
>
>
>

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to