Literal patternΒΆ

A literal pattern consists of a single specific value. For example,

f(5) = "hi"

uses 5 as a literal pattern, and means that on the specific input 5, the function f should output "hi".

Literal patterns can be used with

Note that f(-5) = ... and f(1/2) = ... are technically arithmetic patterns rather than true literal patterns, but the distinction does not matter very much.