A reverse linked-list, as an enumeration in Dotty: enum Tsil[+T] { case Lin case Snoc(init: Tsil[T], last: T) }
I was mainly trying to demonstrate how simple enum makes the definition in Dotty, though!
-
-
right, extra stuff just gets in way. although perhaps you missed ‘enum _class_’ ?
-
That appears not to be necessary...
- 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.