Consider the following list of Boolean values in Scala
List(true, false, false, true)
How would you using either foldRight or foldLeft emulate the function of performing a logical AND on all of the values within the list?
val l = List(true, false, false, true)
val andAll = l.foldLeft(true)(_ && _)