Guest User

Untitled

a guest
May 11th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.17 KB | None | 0 0
  1.   def scanWhile[B <: List[A], A](base: B)(l: Traversable[A])(f: B => Boolean) = {
  2.     l.view.scanLeft(base)((Acc, Term) => Term :: Acc).tail.takeWhile(f(_)).last.reverse
  3.   }
Add Comment
Please, Sign In to add comment