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
import java.nio.charset.Charset | |
import java.nio.charset.StandardCharsets | |
import java.nio.file.Files | |
import java.nio.file.Path | |
import java.nio.file.Paths | |
import java.nio.file.StandardOpenOption | |
import java.util.regex.Pattern | |
import kotlin.math.ln | |
import kotlin.streams.asSequence |
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
import Channel.{Core, Message} | |
object Channel { | |
private case class Message[A](value: A, last: Boolean) | |
private object Message { | |
private val LAST = Message(null, last = true) | |
def last[A]: Message[A] = LAST.asInstanceOf[Message[A]] | |
} |