Erlang Central

List Generators

Revision as of 12:47, 9 September 2008 by Jacque247 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Adam Lindberg

Non-empty list

If you want to generate lists which can never be empty, it's fairly simple to wrap the standard list() generator in QuickCheck:

nelist(G) ->
    ?LET({E, L}, {G, list(G)},