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

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