static Seq<Instant> range(Instant fromInclusive, Instant toExclusive, Duration step) {
        return toExclusive.compareTo(fromInclusive) <= 0 ? empty() : iterate(fromInclusive, t -> t.plus(step)).limitWhile(t -> t.compareTo(toExclusive) < 0);
    }
The range between two values.

@param fromInclusive The lower bound
@param toExclusive The upper bound
@param step The increase between two values
jOOL-java-8/src/main/java/org/jooq/lambda/Seq.java