scala - Applying logical and to list of boolean values -


consider following list of boolean values in scala

list(true, false, false, true) 

how using either foldright or foldleft emulate function of performing logical , on of values within list?

val l = list(true, false, false, true) val andall = l.foldleft(true)(_ && _) 

Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -