A reverse linked-list, as an enumeration in Dotty: enum Tsil[+T] { case Lin case Snoc(init: Tsil[T], last: T) }
-
-
I'm just worried about the syntax that (judging by the sample) would only work inside an enum
-
in Scala 2.x, basically every block of {} would allow the same stuff to be put inside (with minor exceptions) - defs, vals, classes etc
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.