Skip to content
Snippets Groups Projects
Commit a7d7ad3d authored by Alexander Gehrke's avatar Alexander Gehrke
Browse files

[02] Add "final" to foldLeft to allow tailrec check

parent 2c38d262
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ enum List[+A]:
/** recurses through the list, combining elements with the given function
* Uncomment the annotation to enable checking for tail-recursiveness */
//@annotation.tailrec
def foldLeft[B](z: B)(f: (B, A) => B): B = ???
final def foldLeft[B](z: B)(f: (B, A) => B): B = ???
object List:
/** construct a list by passing elements
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment