You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import("fmt")
//return tuple of square and cube of integer "a"funcpowerSeries(aint) (int,int) {
returna*a, a*a*a }
funcmain(){
// execute test return of a tuplesquare, cube:=powerSeries(3)
fmt.Println("Square ", square, "Cube", cube)
}
data structure that groups data
typically immutable sequential collections
the element has related fields of different datatypes.
the only way to modify a tuple is to change the fields
operators such as + and * can be applied to tuples