getify / Functional-Light-JS

Pragmatic, balanced FP in JavaScript. @FLJSBook on twitter.
http://FLJSBook.com
Other
16.6k stars 1.95k forks source link

"argument" should be "parameter" here? #95

Closed JoeHetfield closed 7 years ago

JoeHetfield commented 7 years ago

Ch2, line 277:

Do you spot the [ .. ] brackets around the argument list now? That's array destructuring.

And the code snippet in question:

function foo( [x,y,...args] = [] ) {
    // ..
}

foo( [1,2,3] );

I think the destructuring would happen at [x,y,...args] part, so the "argument list" in the text should be "parameter list".

getify commented 7 years ago

Yep, good catch. PR?

JoeHetfield commented 7 years ago

PR submitted.

getify commented 7 years ago

fixed in #96