Matchbox 0.2

min

Return the lesser of two integers.

Signature

func min(a int, b int) int

Parameters

  • a — the first integer to compare.
  • b — the second integer to compare.

Return Value

The lesser of a and b. If the values are equal, that shared value is returned.

Example

var lowest = min(18, 24)
print(lowest)

The example writes 18 to standard output.