a
This commit is contained in:
@@ -25,5 +25,5 @@ kotlin {
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass.set("me.alex_s168.kreflect.FnpKt")
|
||||
mainClass.set("me.alex_s168.kotlin_bits.FnpKt")
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"
|
||||
}
|
||||
rootProject.name = "kReflect"
|
||||
rootProject.name = "kotlin-bits"
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package me.alex_s168.kreflect
|
||||
package me.alex_s168.kotlin_bits
|
||||
|
||||
import kotlinx.io.*
|
||||
import kotlinx.io.files.Path
|
@@ -1,8 +1,9 @@
|
||||
package me.alex_s168.kreflect
|
||||
package me.alex_s168.kotlin_bits
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
// pureCat(args)
|
||||
// .impure()
|
||||
|
||||
val inp = sequenceOf("AAA", "BBB", "AAA", "AAA", "AAA", "BBB")
|
||||
val out = inp.easyMappingSequence { i, s, m ->
|
||||
if (s(i-1) == m(i)) null
|
||||
@@ -11,6 +12,7 @@ fun main(args: Array<String>) {
|
||||
println(out.contents)
|
||||
}
|
||||
|
||||
// `cat` command
|
||||
fun pureCat(args: Array<String>): Monad<Unit> =
|
||||
args
|
||||
.ifEmpty { arrayOf("-") }
|
@@ -1,4 +1,4 @@
|
||||
package me.alex_s168.kreflect
|
||||
package me.alex_s168.kotlin_bits
|
||||
|
||||
object Ansi {
|
||||
const val ESC = (0x1B).toChar()
|
Reference in New Issue
Block a user