Pudu programming language
Menu
API reference

Std.Semver.satisfies

1 declaration

fn

satisfies: &Std.Semver.Version -> &Std.Semver.Version -> Bool

This is a callable function.

What it does

Whether the second version may stand where the first was asked for.

The promise the scheme makes, written as a test: a caller that asked for

1.2.0 accepts 1.4.1, because a later minor version added things without

taking any away, and refuses 2.0.0, because a new major version is

allowed to have taken something away.

Below 1.0.0 the promise does not hold — the scheme says so — and the

minor number takes the major's place, which is what every registry does in

practice.

A prerelease satisfies nothing but itself: 1.2.0-rc.1 is not 1.2.0, and

a caller who wants it names it.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

Back to Std.SemverSearch related declarations