Hedgehog


Shrink Module

Namespace: Hedgehog

Assembly: Hedgehog.dll

Functions and values

Function or value Description

createTree destination x

Full Usage: createTree destination x

Parameters:
    destination : ^a
    x : ^a

Returns: Tree<^a>

destination : ^a
x : ^a
Returns: Tree<^a>

elems shrink xs00

Full Usage: elems shrink xs00

Parameters:
    shrink : 'a -> seq<'a>
    xs00 : List<'a>

Returns: seq<List<'a>>

Shrink each of the elements in input list using the supplied shrinking function.

shrink : 'a -> seq<'a>
xs00 : List<'a>
Returns: seq<List<'a>>

halves n

Full Usage: halves n

Parameters:
    n : ^a

Returns: seq<^a>

Produce a list containing the progressive halving of an integral.

n : ^a
Returns: seq<^a>

list xs

Full Usage: list xs

Parameters:
Returns: seq<List<'a>>

Shrink a list by edging towards the empty list. Note we always try the empty list first, as that is the optimal shrink.

xs : List<'a>
Returns: seq<List<'a>>

removes k0 xs0

Full Usage: removes k0 xs0

Parameters:
    k0 : int
    xs0 : List<'a>

Returns: seq<List<'a>>

Produce all permutations of removing 'k' elements from a list.

k0 : int
xs0 : List<'a>
Returns: seq<List<'a>>

sequence merge xs

Full Usage: sequence merge xs

Parameters:
Returns: Tree<List<'a>>

Turn a list of trees in to a tree of lists, using the supplied function to merge shrinking options.

merge : List<Tree<'a>> -> seq<List<Tree<'a>>>
xs : List<Tree<'a>>
Returns: Tree<List<'a>>

sequenceElems xs0

Full Usage: sequenceElems xs0

Parameters:
Returns: Tree<List<'a>>

Turn a list of trees in to a tree of lists, opting to shrink only the elements of the list (i.e. the size of the list will always be the same).

xs0 : List<Tree<'a>>
Returns: Tree<List<'a>>

sequenceList xs0

Full Usage: sequenceList xs0

Parameters:
Returns: Tree<List<'a>>

Turn a list of trees in to a tree of lists, opting to shrink both the list itself and the elements in the list during traversal.

xs0 : List<Tree<'a>>
Returns: Tree<List<'a>>

towards destination x

Full Usage: towards destination x

Parameters:
    destination : ^a
    x : ^a

Returns: seq<^a>

Shrink an integral number by edging towards a destination.

destination : ^a
x : ^a
Returns: seq<^a>

towardsDouble destination x

Full Usage: towardsDouble destination x

Parameters:
    destination : double
    x : double

Returns: seq<double>

Shrink a floating-point number by edging towards a destination. Note we always try the destination first, as that is the optimal shrink.

destination : double
x : double
Returns: seq<double>