cats icon indicating copy to clipboard operation
cats copied to clipboard

Proper universally quantified `const`

Open adelbertc opened this issue 10 years ago • 1 comments

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
}

adelbertc avatar Jul 11 '15 18:07 adelbertc

7 years later answer: wasn't it implemented as Const?

TonioGela avatar Sep 25 '22 12:09 TonioGela