This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am benchr267 on github. | |
* I am benchr (https://keybase.io/benchr) on keybase. | |
* I have a public key ASCEmPBxoIxQBk-w71PtgrWZfzFrd4nAUFvnvHgh5SnQhAo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
indirect enum List<T>: CustomStringConvertible { | |
case empty | |
case cons(T, List<T>) | |
init(_ values: T...) { | |
self = List(values) | |
} | |
init<U: Sequence>(_ values: U) where U.Element == T { | |
self = values.reversed().reduce(.empty) { $0.prepend($1) } |