Last active
December 19, 2020 18:01
-
-
Save chrisport/4e3f2118ce9e7b02ead40a26b6a692bb to your computer and use it in GitHub Desktop.
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
interface Subject | |
interface Verb | |
infix fun Subject.can(what: Verb): Verb = what | |
infix fun <T> Subject.seems(what: T) = what | |
infix fun <T> Any.with(withWhat: T) = withWhat | |
infix fun <T> Any.odd(oddWhat: T) = oddWhat | |
infix fun <T> Any.of(ofWhat: T) = ofWhat | |
infix fun <T> Any.any(what: T) = what | |
object I: Subject | |
object You: Subject | |
object It: Subject | |
object sentence | |
object think: Verb | |
object write: Verb | |
object useless | |
object a | |
object that | |
object number | |
object words | |
object so | |
fun main() { | |
I can write any sentence with a odd number of words | |
It seems useless | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment