Advertisement
tinyevil

Untitled

Feb 19th, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. "Borrow syntax"
  2.  
  3. let (x,y, ...) = foo(&a,b,c,&d, ...) => let (a,d,x,y ...) = foo(a,b,c,d, ...)
  4.  
  5. So each "&variable" captures one element from the returned tuple, in order. Even immutable variables are allowed to be rebound in this
  6. way, introducing a new immutable variable within the scope.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement