On this page:
revision-number?
revision-number-string?
revision-number-variant?
coerce-revision-number
coerce-revision-number-string
make-minimum-revision-number
make-maximum-revision-number
find-latest-available-revision-number
find-oldest-available-revision-number
8.12

19 Versions🔗ℹ

 (require denxi/version) package: denxi

A package definition has a version.

A version is a combination of an edition and a revision.

An edition is a non-empty string that names a target audience.

An edition has at least one revision.

A revision is an implementation of an edition. We select a revision using a revision number or a revision name.

A revision number is an exact non-negative integer that starts at 0.

A revision name is a string alias for a revision number that contains at least one non-digit. A revision name may repeat across but not within editions.

Returns #t if the input value is useable as a revision number.

Returns #t if the input value is a string that, when converted to a number, is useable as a revision number.

procedure

(revision-number-variant? v)  boolean?

  v : any/c

Returns a revision number in terms of a variant type.

Returns a revision number string in terms of a variant type.

procedure

(make-minimum-revision-number boundary 
  #:exclusive? exclusive?) 
  revision-number?
  boundary : revision-number?
  exclusive? : any/c
Returns a revision number, interpreting another as a minimum boundary for an integer interval. If exclusive? is #f, then the return value is simply boundary. Otherwise, it’s (add1 boundary).

procedure

(make-maximum-revision-number boundary 
  #:exclusive? exclusive?) 
  revision-number?
  boundary : revision-number?
  exclusive? : any/c
Returns a revision number, interpreting another as a maximum boundary for an integer interval. If exclusive? is #f, then the return value is simply boundary. Otherwise, it’s (max 0 (sub1 boundary)).

procedure

(find-latest-available-revision-number available? 
  lo 
  hi) 
  (or/c #f revision-number?)
  available? : (-> revision-number? any/c)
  lo : revision-number?
  hi : revision-number?
Finds the largest element of the inclusive interval {lo .. hi} where available? returns a true value. Returns #f if no such element exists.

procedure

(find-oldest-available-revision-number available? 
  lo 
  hi) 
  (or/c #f revision-number?)
  available? : (-> revision-number? any/c)
  lo : revision-number?
  hi : revision-number?
Finds the smallest element of the inclusive interval {lo .. hi} where available? returns a true value. Returns #f if no such element exists.