Fox icon indicating copy to clipboard operation
Fox copied to clipboard

FOXBind does not shrink consistently when nested

Open jeffh opened this issue 10 years ago • 0 comments

FOXBind should prefer shrinking first values. But it seems to shrink more arbitrarily.

Needs more investigation.

Drawing from memory.

id<Generator> generator = FOXBind(FOXInteger(), ^id (id num1){
    return FOXBind(FOXInteger(), ^id (id num2) {
        return @[num1, num2];
    });
});

FOXAssert(FOXForAll(generator, ^BOOL (NSArray *values) {
    return [values[0] integerValue] + [values[1] integerValue] < 10;
});

jeffh avatar Feb 04 '15 06:02 jeffh