Re: Generic symbolic sequence assignment
- Posted by Fernando Nov 19, 2011
- 1363 views
DerekParnell said...
mattlewis said...
Fernando said...
Could we use any kind of symbolic sequence in LHS of assignment ?
For example, would the following assignment be possible?
{{a,b},c} = {{d,e},f}
Yes, we could. My first implementation doesn't have this (it's very simple), but there's no technical reason why we couldn't. I wasn't sure if we wanted to go down this route, although I could see the usefulness.
Matt
Isn't this simplier and faster ...
a = d b = e c = f
Probably, in this specific case. However, the LHS generic symbolic sequence shows its usefulness when the RHS is a function that returns a generic sequence.
- Fernando