Why do i encounter 'cannot assign to property: function call returns immutable value' in swift?

This error surfaces when you attempt to modify a value returned from a function call directly, especially when that value is immutable.


  func getTuple() -> (Int, Int) {
      return (1, 2)
  getTuple().0 = 3

  var myTuple = getTuple()
  myTuple.0 = 3

Beginner's Guide to Swift