Function: Difference between revisions

Jump to navigation Jump to search
4 bytes removed ,  09:53, 13 March 2020
m
(→‎Function valence: Use this section instead of a dedicated page)
Line 5: Line 5:
== Function valence ==
== Function valence ==


Functions may take zero, one, or two arguments when applied (to pass more arguments, combine them into a single list argument). Which of these possibilities applies is known as the function's [[valence]]:
Functions may take zero, one, or two arguments when applied (to pass more arguments, combine them into a single list argument). Which of these possibilities applies is known as the function's valence:
* A [[niladic function]] takes no arguments: it is evaluated immediately when execution reaches it.
* A [[niladic function]] takes no arguments: it is evaluated immediately when execution reaches it.
* A [[monadic function]] or ''prefix function'' takes one argument on its right.
* A [[monadic function]] or ''prefix function'' takes one argument on its right.

Navigation menu