[<<][compsci][>>][..]
Thu Aug 14 19:39:15 EDT 2014

CoArbitary

   "the CoArbitrary class continues to confuse me"[1]

To make an arbitrary function a -> b, make a generator for b based on
a generator for b and some "shuffling" applied through the value of a.

Why is there a 0 in the following list?

*Main> shrink [1,2,3]
[[],[2,3],[1,3],[1,2],[0,2,3],[1,0,3],[1,1,3],[1,2,0],[1,2,2]]

because shrink 1 produces 0.


[1] http://www.reddit.com/r/programming/comments/1mcu8/roll_your_own_window_manager_haskell_and/c1md04



[Reply][About]
[<<][compsci][>>][..]