cats
cats copied to clipboard
Proper universally quantified `const`
Would something like this be useful/belong in Cats and if so where would it belong?
def const[A](a: A): ConstAux[A] = new ConstAux(a)
final class ConstAux[A] private[cats](a: A) {
def apply[B](b: => B): A = a
}
7 years later answer: wasn't it implemented as Const?