Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Origin of the term "Predicate" to refer to a boolean function?

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?

like image 457
Justin Ethier Avatar asked Dec 17 '22 12:12

Justin Ethier


1 Answers

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.

like image 148
NOtherDev Avatar answered Mar 07 '23 01:03

NOtherDev