This file contains hidden or 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 Data<T: Data> { | |
| companion object { | |
| abstract fun decode(encoded: Encoded): T | |
| } | |
| } | |
| class Coords2D : Data<Coords2D> { | |
| companion object { | |
| fun decode(encoded: Encoded): Coords2D { | |
| ... |
This file contains hidden or 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
| fun Int.one(x: Int) = this + 1 + x | |
| fun Int.two(x: Int) = this + 2 + x | |
| fun Int.three(x: Int) = this + 3 + x | |
| fun Int.noop(x: Int) = this + x | |
| class Z(val action: Int.() -> Int) |
This file contains hidden or 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
| 2018-01-15 01:39:51.598 [nettyCallPool-4-3] ERROR ktor.application - 101 Switching Protocols: GET - /ws/0 | |
| java.lang.NoSuchMethodError: kotlinx.coroutines.experimental.channels.ActorKt.actor(Lkotlin/coroutines/experimental/CoroutineContext;ILkotlinx/coroutines/experimental/CoroutineStart;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/experimental/channels/SendChannel; | |
| at io.ktor.websocket.WebSocketWriter.<init>(WebSocketWriter.kt:10) | |
| at io.ktor.websocket.RawWebSocketImpl.<init>(RawWebSocketImpl.kt:18) | |
| at io.ktor.websocket.WebSocketUpgrade.upgrade(WebSocketUpgrade.kt:37) | |
| at io.ktor.server.netty.http1.NettyHttp1ApplicationResponse.respondUpgrade(NettyHttp1ApplicationResponse.kt:69) | |
| at io.ktor.server.engine.BaseApplicationResponse.respondOutgoingContent$suspendImpl(BaseApplicationResponse.kt:62) | |
| at io.ktor.server.engine.BaseApplicationResponse.respondOutgoingContent(BaseApplicationResponse.kt) | |
| at io.ktor.server.netty.NettyApplicationResponse.respondOutgoingContent$suspendImpl(NettyApplicationResponse |
This file contains hidden or 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
| (let [fs [+ - *] | |
| cbd [c b d] | |
| m (x a b c d)] | |
| (for [f1 fs f2 fs f3 fs, | |
| o-1 cbd o-2 cbd o-3 cbd] | |
| (let [res (f1 (f2 (f3 m o-1) o-2) o-3)] | |
| [(make res a) [f1 f2 f3] [o-1 o-2 o-3] res]))) |
NewerOlder