diff options
Diffstat (limited to 'test/files/pos/lambda.scala')
-rw-r--r-- | test/files/pos/lambda.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/pos/lambda.scala b/test/files/pos/lambda.scala new file mode 100644 index 0000000000..187b3f9783 --- /dev/null +++ b/test/files/pos/lambda.scala @@ -0,0 +1,8 @@ +object 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); +}
\ No newline at end of file |