Closed olleicua closed 11 years ago
It may also be useful to have a destructuring form of let
. Perhaps it can be as simple as if an even indexed element of the first argument of the let
is a list then it destructures so that
(let (a 1
(b c) [2 3])
(console.log a b c))
produces 1 2 3
I'm considering allowing splats in destructurings but I'm not sure if it would really be worth it to add the full object destructuring from coffeescript.
I'm thinking the best way to do this would be to add a form to
set
(andset+
etc). Something like:HCL:
JavaScript: