1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-12-01 22:41:43 +02:00

doc: ad doc to SK function

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2023-09-13 15:04:19 +02:00
parent da1449e680
commit 9a9d13b066
3 changed files with 4 additions and 0 deletions

View File

@@ -21,10 +21,12 @@ func Of[T1 any](t T1) Tuple1[T1] {
return MakeTuple1(t)
}
// First returns the first element of a [Tuple2]
func First[T1, T2 any](t Tuple2[T1, T2]) T1 {
return t.F1
}
// Second returns the second element of a [Tuple2]
func Second[T1, T2 any](t Tuple2[T1, T2]) T2 {
return t.F2
}