Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala function signature: What does (p: (T, B) ⇒ Boolean) mean?

Tags:

scala

During reading Scala documentation i confused with some functions signature:

def corresponds[B](that: GenSeq[B])(p: (T, B) ⇒ Boolean): Boolean 

So, what does exactly this mean?

(p: (T, B) ⇒ Boolean)
like image 975
Absolut Avatar asked Feb 10 '23 20:02

Absolut


1 Answers

It means p is a function taking two arguments of type T and B and returning Boolean.

like image 85
Kim Stebel Avatar answered Feb 16 '23 02:02

Kim Stebel