oh yeah, my scale example did look a lot like fmap.

There is some context on the original jira ticket 
<http://dev.clojure.org/jira/browse/TCHECK-68>.

scale lets you modify the size of objects generated by a generator. So e.g. 
(gen/list 
gen/nat) will under normal settings generate lists of size 0-200 of numbers 
from 0-200. But if you scale it via (gen/scale #(* 1000 %) (gen/list 
gen/nat)) you will generate *much bigger* lists of larger numbers. Though 
probably more common uses for scale would be for limiting sizes (e.g., 
(gen/scale 
#(max % 20) gen/string)).

Gary

On Saturday, August 15, 2015 at 8:57:02 PM UTC-5, Laurens Van Houtven wrote:
>
> Hi Gary 
>
>
> Thanks a lot for your hard work; I'm a big fan of test.check and have been 
> tracking the RCs :)
>
> Could you help me understand  the difference between scale and fmap?
>
>
> thanks 
> lvh 
>
> Sent from my iPhone
>
> On Aug 15, 2015, at 13:08, Gary Fredericks <frederi...@gmail.com 
> <javascript:>> wrote:
>
> I'm happy to announce the release today of version 0.8.0 of test.check 
> <https://github.com/clojure/test.check>, the QuickCheck-inspired 
> property-based testing library. The release is light on new features, but 
> has a couple important changes: 
>
>    - The generators now use an immutable random number generator under 
>    the hood, which makes the determinism a lot less brittle and enables 
>    various extensions and new features 
>    - The ClojureScript namespaces have been renamed – all occurrences of 
>    `cljs` have been changed to `clojure` so that the clj and cljs namespaces 
>    are consistent. This is an internal improvement since it means we can 
>    upgrade the codebase to use .cljc files, but it also makes things easier 
>    for writing portable tools & tests for/with test.check. 
>
> Additionally there are two new generator functions: 
>
>    - scale: a function that lets you tweak the size of a given generator, 
>    e.g. (gen/scale #(* % 1000) gen/nat) 
>    - generate: an alternative to sample that returns a single generated 
>    object, defaulting to a larger size to give you an idea of what 
> non-trivial 
>    values look like for the generator 
>
> There are a handful of new features planned for upcoming releases: 
>
>    - running tests in parallel (on the jvm) 
>    - generating specifically-sized collections of distinct elements 
>    - better options for integration with other testing frameworks 
>
> As always I welcome any feedback, ideas, or experience reports. 
>
>
> Gary
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com <javascript:>
> Note that posts from new members are moderated - please be patient with 
> your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com <javascript:>
> 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+u...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>

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