File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,57 @@ def Test =
1111 x + 1
1212 println(y)
1313
14+
15+ true // Should not count as the call true()
16+ ()
17+
18+ // Setup
19+ def times (x : Int )(f : => Unit ): Unit =
20+ (0 to x).foreach(_ => f)
21+ val credentials = Seq ()
22+ object Path {def userHome = File }
23+ object File {def exists = true ; def / (s : String ) = this }
24+ def Credentials (f : File .type ) = f
25+ val xs = List (1 ,2 ,3 )
26+ def f (x : Int , g : Int => Int ) = g(x)
27+ val x = 4
28+
29+ // Copied from docs/_docs/reference/other-new-features/indentation.md
30+
31+ times(10 ):
32+ println(" ah" )
33+ println(" ha" )
34+
35+ credentials `++` :
36+ val file = Path .userHome / " .credentials"
37+ if file.exists
38+ then Seq (Credentials (file))
39+ else Seq ()
40+
41+ xs.map:
42+ x =>
43+ val y = x - 1
44+ y * y
45+
46+ xs.foldLeft(0 ): (x, y) =>
47+ x + y
48+
49+ {
50+ val x = 4
51+ f(x : Int , y =>
52+ x * (
53+ y + 1
54+ ) +
55+ (x +
56+ x)
57+ )
58+ }
59+
60+ x match
61+ case 1 => print(" I" )
62+ case 2 => print(" II" )
63+ case 3 => print(" III" )
64+ case 4 => print(" IV" )
65+ case 5 => print(" V" )
66+
67+ println(" ." )
You can’t perform that action at this time.
0 commit comments