Changeset 30559 in project


Ignore:
Timestamp:
03/14/14 20:07:11 (7 years ago)
Author:
certainty
Message:

data-generators: simplified example

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/data-generators

    r30558 r30559  
    3939  (let ((scalar (gen-json-scalar)))
    4040    (if (positive? nesting)
    41         (let ((complex (gen-json-complex (sub1 nesting)))
    42               (bool    (gen-bool)))
    43           (generator
    44            (if (<- bool)
    45                (<- scalar)
    46                (<- complex))))
     41        (gen-sample-of (gen-json-complex (sub1 nesting)) scalar)
    4742        scalar)))
    4843
Note: See TracChangeset for help on using the changeset viewer.