Skip to content

Commit

Permalink
wrap array
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanlas committed Aug 21, 2024
1 parent 9224083 commit 9e1a618
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.htmlism.spawningpool.combinatorics.specialized

import scala.collection.immutable.ArraySeq
import scala.reflect.ClassTag

import com.htmlism.spawningpool.combinatorics
Expand All @@ -8,6 +9,6 @@ trait HomogenousCombinator[A] extends combinatorics.HomogenousCombinator[A] {
implicit def classTag: ClassTag[A]

override def fill(size: Int): (=> A) => Seq[A] = { fill =>
Array.fill[A](size)(fill)
ArraySeq.unsafeWrapArray(Array.fill[A](size)(fill))
}
}

0 comments on commit 9e1a618

Please sign in to comment.