the right const function in Scala
Jun. 4th, 2012 11:12 pmRunar says
And if you find it stupid or funny, you probably JUST DON'T GET IT.
This is the deep essence of things.
def const = new (Id ~> K) {
  def apply[A](a: => A) = new K[A] {
    def apply[B](b: => B) = a
  }
}
And if you find it stupid or funny, you probably JUST DON'T GET IT.
This is the deep essence of things.
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)



