Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SCALA

scala predicate

//A predicate is a function that returns a Boolean.
//For example, to check if an Integer is even we can define the 
//function isEven.

def isEven(i: Int) = i % 2 == 0
isEven: (i: Int)Boolean
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #scala #predicate
ADD COMMENT
Topic
Name
1+6 =