In Scheme, the term "predicate" is used as follows:
A predicate is a procedure that always returns a boolean value (#t or #f).
Why does scheme use "predicate" to refer to such a function? And if the usage comes from a previous language, what was the motivation for selecting this term in the first place?
Well, this comes from mathematical logic, as Wikipedia says, predicate is a fundamental concept in first-order logic. In every "implementation" of logic, predicate is a sentence that is either true or false - so it fits into programming languages very well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With