What is the higher order function equivalent expression to the following?
def isRepeated:Boolean = {
prev match {
case Some(a) => a.prev match {
case Some(b) => b.equals(this)
case None => false
}
case None => false
}
}
What is the higher order function equivalent expression to the following?
def isRepeated:Boolean = {
prev match {
case Some(a) => a.prev match {
case Some(b) => b.equals(this)
case None => false
}
case None => false
}
}
I believe this is equivalent: