ohnosequences / stuff

Useful stuff.
GNU Affero General Public License v3.0
1 stars 0 forks source link

SAMs and lambdas #75

Closed eparejatobes closed 6 years ago

eparejatobes commented 6 years ago

See

eparejatobes commented 6 years ago

It looks like we could have something like

private[stuff] final class Function[X, Y] {

  def apply(a: X): Y
}

and we would not need any λ { x => ... }; we can directly assign a function literal

def id[X]: X -> X =
  x => x
eparejatobes commented 6 years ago

Looks to be working. Nice! I'll submit a PR later.