@@ -29,7 +29,7 @@ object Contents:
2929 mutable.ArrayBuffer .unapplySeq[T ](contents)
3030
3131 extension [CV <: RiddlValue ](container : Contents [CV ])
32- inline def apply (n : Int ): CV = container.apply(n)
32+ def apply (n : Int ): CV = container.apply(n)
3333end Contents
3434
3535extension [CV <: RiddlValue ](sequence : Seq [CV ])
@@ -40,35 +40,35 @@ extension [CV <: RiddlValue](sequence: Seq[CV])
4040 )
4141
4242extension [CV <: RiddlValue ](container : Contents [CV ])
43- inline def length : Int = container.length
44- inline def size : Int = container.length
45- inline def head : CV = container(0 )
46- inline def indexOf [B >: CV ](elem : B ): Int = container.indexOf[B ](elem, 0 )
47- inline def splitAt (n : Int ): (Contents [CV ], Contents [CV ]) = container.splitAt(n)
48- inline def indices : Range = Range (0 , container.length)
49- inline def foreach [T ](f : CV => T ): Unit = container.foreach(f)
50- inline def forall (p : CV => Boolean ): Boolean = container.forall(p)
51- inline def update (index : Int , elem : CV ): Unit = container.update(index, elem)
52- inline def foldLeft [B ](z : B )(op : (B , CV ) => B ): B = container.foldLeft[B ](z)(op)
53- inline def isEmpty : Boolean = container.isEmpty
54- inline def nonEmpty : Boolean = ! isEmpty
55- inline def mapValue [B <: RiddlValue ](f : CV => B ): Contents [B ] = container.map[B ](f)
56- inline def flatMap [B <: RiddlValue ](f : CV => IterableOnce [B ]): Contents [B ] =
43+ def length : Int = container.length
44+ def size : Int = container.length
45+ def head : CV = container(0 )
46+ def indexOf [B >: CV ](elem : B ): Int = container.indexOf[B ](elem, 0 )
47+ def splitAt (n : Int ): (Contents [CV ], Contents [CV ]) = container.splitAt(n)
48+ def indices : Range = Range (0 , container.length)
49+ def foreach [T ](f : CV => T ): Unit = container.foreach(f)
50+ def forall (p : CV => Boolean ): Boolean = container.forall(p)
51+ def update (index : Int , elem : CV ): Unit = container.update(index, elem)
52+ def foldLeft [B ](z : B )(op : (B , CV ) => B ): B = container.foldLeft[B ](z)(op)
53+ def isEmpty : Boolean = container.isEmpty
54+ def nonEmpty : Boolean = ! isEmpty
55+ def mapValue [B <: RiddlValue ](f : CV => B ): Contents [B ] = container.map[B ](f)
56+ def flatMap [B <: RiddlValue ](f : CV => IterableOnce [B ]): Contents [B ] =
5757 container.flatMap[B ](f)
58- inline def startsWith [B >: CV ](that : IterableOnce [B ], offset : Int = 0 ): Boolean =
58+ def startsWith [B >: CV ](that : IterableOnce [B ], offset : Int = 0 ): Boolean =
5959 container.startsWith[B ](that)
6060 def toSet [B >: CV <: RiddlValue ]: immutable.Set [B ] = immutable.Set .from(container)
6161 def toSeq : immutable.Seq [CV ] = container.toSeq
6262 def toIterator : Iterator [CV ] = container.toIterator
63- inline def dropRight (howMany : Int ): Contents [CV ] = container.dropRight(howMany)
64- inline def drop (howMany : Int ): Contents [CV ] = container.drop(howMany)
65- inline def clear (): Unit = container.clear()
66- inline def remove (index : Int ): CV = container.remove(index)
67- inline def append (elem : CV ): Unit = container.append(elem)
68- inline def prepend (elem : CV ): Unit = container.prepend(elem)
69- inline def += (elem : CV ): Contents [CV ] = { container.addOne(elem); container }
70- inline def ++= (suffix : IterableOnce [CV ]): Contents [CV ] = { container.addAll(suffix); container }
71- inline def ++ (suffix : IterableOnce [CV ]): Contents [CV ] =
63+ def dropRight (howMany : Int ): Contents [CV ] = container.dropRight(howMany)
64+ def drop (howMany : Int ): Contents [CV ] = container.drop(howMany)
65+ def clear (): Unit = container.clear()
66+ def remove (index : Int ): CV = container.remove(index)
67+ def append (elem : CV ): Unit = container.append(elem)
68+ def prepend (elem : CV ): Unit = container.prepend(elem)
69+ def += (elem : CV ): Contents [CV ] = { container.addOne(elem); container }
70+ def ++= (suffix : IterableOnce [CV ]): Contents [CV ] = { container.addAll(suffix); container }
71+ def ++ (suffix : IterableOnce [CV ]): Contents [CV ] =
7272 container.concat[CV ](suffix).asInstanceOf [Contents [CV ]]
7373 private def identified : Contents [CV ] = container.filter(_.isIdentified)
7474 def filter [T <: RiddlValue : ClassTag ]: Seq [T ] =
0 commit comments