summaryrefslogtreecommitdiff
path: root/test/files/pos/lambda.scala
blob: 27c273cc3cdcf1455301a9bf3330ac1e4ccd7b0d (plain) (blame)
1
2
3
4
5
6
7
8
module test {

  def apply[a,b](f: a => b): a => b  =  x: a => f(x);

  def twice[a](f: a => a): a => a  =  x: a => f(f(x));

  def main = apply[Int,Int](twice[Int](x: Int => x))(1);
}