Syntax fixed

This commit is contained in:
Andrey Breslav
2011-07-06 18:50:40 +04:00
parent 50a1eeeb59
commit b621e89396
2 changed files with 3 additions and 3 deletions
@@ -3,6 +3,6 @@ fun box() : String {
return if (sum(200, { val ff = {cl}; ff() }) == 239) "OK" else "FAIL"
}
fun sum(arg:Int, f : {() : Int}) : Int {
fun sum(arg:Int, f : fun () : Int) : Int {
return arg + f()
}
@@ -1,10 +1,10 @@
class Point(val x:Int, val y:Int) {
fun mul() : {(scalar:Int):Point} {
fun mul() : fun (scalar:Int):Point {
return { (scalar:Int):Point => Point(x * scalar, y * scalar) }
}
}
val m = Point(2, 3).mul() : {(scalar:Int):Point}
val m = Point(2, 3).mul() : fun (scalar:Int):Point
fun box() : String {
val answer = m(5)