News for hackers. Stuff that matters.
Re:Seemingly impossible functional programs (2007) by Jtsummers on Thursday October 28, 2021 @09:17PM (#29034133)
p is a predicate, which is a function mapping elements of some type to true/false (booleans). A total function is a function which is defined for all possible inputs. So a total predicate is a function that maps all possible inputs to either true or false.
Re:Seemingly impossible functional programs (2007) by pvillano on Tuesday November 02, 2021 @10:02AM (#29081346)
For real numbers, f(x)=x² is a total function, but g(x)=√x is not, because g is undefined for x<0