2,951
edits
(→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 | 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. |