mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-10 07:25:50 +01:00
Introduce ControlUtil which provides control facilities such as using() or defining().
This commit is contained in:
@@ -12,7 +12,7 @@ object Implicits {
|
||||
def splitWith(condition: (A, A) => Boolean): Seq[Seq[A]] = split(seq)(condition)
|
||||
|
||||
@scala.annotation.tailrec
|
||||
private def split[A](list: Seq[A], result: Seq[Seq[A]] = Nil)(condition: (A, A) => Boolean): Seq[Seq[A]] = {
|
||||
private def split[A](list: Seq[A], result: Seq[Seq[A]] = Nil)(condition: (A, A) => Boolean): Seq[Seq[A]] =
|
||||
list match {
|
||||
case x :: xs => {
|
||||
xs.span(condition(x, _)) match {
|
||||
@@ -21,7 +21,6 @@ object Implicits {
|
||||
}
|
||||
case Nil => result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
implicit class RichString(value: String){
|
||||
|
||||
Reference in New Issue
Block a user