Skip to content

Commit f98f790

Browse files
committed
Expose typelevel axis indices as a Seq, not a Set
1 parent efb5be7 commit f98f790

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

common/src/main/scala/io/kjaer/compiletime/Indices.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ sealed trait Indices {
1010
def :::[H <: Index, This >: this.type <: Indices](head: H): H ::: This =
1111
io.kjaer.compiletime.:::(head, this)
1212

13-
def indices: Set[Int] = this match {
14-
case head ::: tail => tail.indices + head
15-
case INil => Set.empty
13+
def indices: Seq[Int] = this match {
14+
case INil => Nil
15+
case head ::: tail => head +: tail.indices
1616
}
17+
1718
}
1819

1920
final case class :::[H <: Index, T <: Indices](head: H, tail: T) extends Indices {

0 commit comments

Comments
 (0)