Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def genAnd(xs: List[Boolean]): Boolean = {
- def acc(x: Int, xs: List[Boolean]): Boolean = {
- if (xs.isEmpty) true
- else if (xs.head == false) false
- else acc(0, xs.tail)
- }
- acc(0, xs.tail)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement