Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
SloopJon
· 10y ago · 0 comments
var (r, g, b, a) = pixel
Comments
[–]
sergiotapia
10y ago
Looks a lot like Elixir's pattern matching to extract values from maps.
someMap = {1, 2} {foo, bar} = someMap foo # 1 bar # 2
[–]
int_19h
10y ago
This is destructuring assignment, as practiced by many languages before. Pretty much anything in the ML family, for example.