In functions, need clarity on x example for adding to variable vs modifying variable. I think we may be conflating two topics:
- adding to variable type that can accept additional content (more of appending, like adding content to array as in
potato example)
- modifying variable as in overwriting existing content
As written, I can see some confusion because x <- x + 1 is used as an example for both. In context of mismatch in data type, but that is more about not being able to add integers and strings, less about ability to add content to a variable, depending on structure, vs overwriting variable entirely.
Anyway, flagging for discussion.
In functions, need clarity on
xexample for adding to variable vs modifying variable. I think we may be conflating two topics:potatoexample)As written, I can see some confusion because
x <- x + 1is used as an example for both. In context of mismatch in data type, but that is more about not being able to add integers and strings, less about ability to add content to a variable, depending on structure, vs overwriting variable entirely.Anyway, flagging for discussion.