swift - Is it possible to take a tuple returned from a func and pass it into another func? -
swift - Is it possible to take a tuple returned from a func and pass it into another func? -
is possible take tuple returned func , pass func without introducing variable?
this way can come with:
func gettuple() -> (x:float, y:float) { homecoming (0, 0) } func processtuple(x:float, y:float) { } allow pt = gettuple() processtuple(pt.x, pt.y)
function can take tuple argument
func gettuple() -> (x:float, y:float) { homecoming (0, 0) } func processtuple(t:(float, float)) { } processtuple(gettuple()) tuples swift
Comments
Post a Comment