repo for my hex addons :3
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ragebait upskill challenge

+12 -2
+12 -2
src/main/scala/org/eu/net/pool/hexic/Hexic.scala
··· 94 94 import java.{lang, util} 95 95 import scala.annotation.unchecked.uncheckedVariance 96 96 import scala.annotation.{elidable, experimental, showAsInfix, tailrec, targetName, unused} 97 - import scala.collection.IterableOnceOps 97 + import scala.collection.{IterableOps, IterableOnceOps} 98 98 import scala.ref.WeakReference 99 99 import scala.util.{Failure, Success, Try} 100 100 export scala.collection.convert.ImplicitConversions.* ··· 2380 2380 case y: T => Some((x, y)) 2381 2381 case _ => None 2382 2382 2383 - implicit class IterExt[T](i: IterableOnceOps[T, ?, ?]): 2383 + implicit class IterExt[T](i: IterableOps[T, ?, ?]): 2384 + export i.{exists => ∃, forall => ∀} 2385 + def findFirstOrLast(p: T => Boolean): Option[T] = 2386 + boundary: 2387 + (None /: i): 2388 + case (ctx, x) => 2389 + if p(x) then 2390 + boundary.break(Some(x)) 2391 + else 2392 + Some(x) 2393 + implicit class IterOnceExt[T](i: IterableOnceOps[T, ?, ?]): 2384 2394 export i.{exists => ∃, forall => ∀} 2385 2395 def findFirstOrLast(p: T => Boolean): Option[T] = 2386 2396 boundary: