JS stdlib: drop TuplesCode.kt -- switch to use tuples from stdlib.
This commit is contained in:
@@ -7,3 +7,5 @@ library
|
|||||||
public trait Closeable {
|
public trait Closeable {
|
||||||
public open fun close() : Unit;
|
public open fun close() : Unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trait Serializable
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
package kotlin
|
|
||||||
|
|
||||||
// TODO: make it a data class
|
|
||||||
public class Pair<A, B> (
|
|
||||||
public val first: A,
|
|
||||||
public val second: B
|
|
||||||
) {
|
|
||||||
public fun component1(): A = first
|
|
||||||
public fun component2(): B = second
|
|
||||||
|
|
||||||
override fun toString(): String = "($first, $second)"
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Triple<A, B, C> (
|
|
||||||
public val first: A,
|
|
||||||
public val second: B,
|
|
||||||
public val third: C
|
|
||||||
) {
|
|
||||||
public fun component1(): A = first
|
|
||||||
public fun component2(): B = second
|
|
||||||
public fun component3(): C = third
|
|
||||||
|
|
||||||
override fun toString(): String = "($first, $second, $third)"
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user