given( $iterator = new LUT\CallbackGenerator(function ($key) { return $key * 2; }), $limit = new LUT\Limit($iterator, 0, 5) ) ->when($result = iterator_to_array($limit)) ->then ->array($result) ->isEqualTo([ 0, 2, 4, 6, 8 ]); } }