List package:hedgehog

List
Generates a list using a Range to determine the length.
Shrink a list by edging towards the empty list.
>>> list [1,2,3]
[[],[2,3],[1,3],[1,2]]
>>> list "abcd"
["","cd","ab","bcd","acd","abd","abc"]
Note we always try the empty list first, as that is the optimal shrink.
The method readList is provided to allow the programmer to give a specialised way of parsing lists of values. For example, this is used by the predefined Read instance of the Char type, where values of type String should be are expected to use double quotes, rather than square brackets.
The method showList is provided to allow the programmer to give a specialised way of showing lists of values. For example, this is used by the predefined Show instance of the Char type, where values of type String should be shown in double quotes, rather than between square brackets.