- 2 Maids Triggered the End for Dorner
- Syrian Rebels' New Cash Source: Stolen...
- Pope: I'm Leaving for 'Good of the...
- Rubio's Water Gulp Goes Viral
- Remains Found in Dorner Cabin
>>2
A great and insidious evil perpetrated by EXPERT PROGRAMMERS
Name:
Yuri2013-02-13 23:20
I visited that page... and i saw this in the comments:
"This reminds me of a feature in lisp. I think it's call structured binds"
Can a Lisper explain me what that means????
Name:
Anonymous2013-02-14 6:19
It's called destructuring bind and here's how it works in FIOC:
>>> stuff = [1, [2, (3, 4)], [5]]
>>> a, (b, c), [d] = stuff
>>> print a, b, c, d
1 2 (3, 4) 5
Note that tuples and lists can be freely mixed, on the LHS it doesn't matter which you use because no tuples or lists are actually created, that's just syntax, (but lists are sort of nicer because you don't have to deal with Python's (x,) wart), on the RHS any sequence-like type will do.