fn (Keyword)

fn declares a function in Default flavor. Omit parameter and return annotations when inference can derive them. ML declares functions without the fn keyword.

Example

fn greet(name) = "Hello, ${name}!"
print(greet("Alice"))
greet name = "Hello, ${name}!"
print (greet "Alice")

Both programs print Hello, Alice!.