All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.foldright.cffu.kotlin.CffuTupleExtensions.kt Maven / Gradle / Ivy

There is a newer version: 1.0.0-Alpha29
Show newest version
package io.foldright.cffu.kotlin

import io.foldright.cffu.tuple.Tuple2
import io.foldright.cffu.tuple.Tuple3
import io.foldright.cffu.tuple.Tuple4
import io.foldright.cffu.tuple.Tuple5


/*
  This file contains the destructuring declarations for cffu tuples

  https://kotlinlang.org/docs/destructuring-declarations.html
*/

operator fun  Tuple2.component1(): T1 = _1
operator fun  Tuple2<*, T2>.component2(): T2 = _2

operator fun  Tuple3.component1(): T1 = _1
operator fun  Tuple3<*, T2, *>.component2(): T2 = _2
operator fun  Tuple3<*, *, T3>.component3(): T3 = _3

operator fun  Tuple4.component1(): T1 = _1
operator fun  Tuple4<*, T2, *, *>.component2(): T2 = _2
operator fun  Tuple4<*, *, T3, *>.component3(): T3 = _3
operator fun  Tuple4<*, *, *, T4>.component4(): T4 = _4

operator fun  Tuple5.component1(): T1 = _1
operator fun  Tuple5<*, T2, *, *, *>.component2(): T2 = _2
operator fun  Tuple5<*, *, T3, *, *>.component3(): T3 = _3
operator fun  Tuple5<*, *, *, T4, *>.component4(): T4 = _4
operator fun  Tuple5<*, *, *, *, T5>.component5(): T5 = _5




© 2015 - 2024 Weber Informatics LLC | Privacy Policy