getify / Functional-Light-JS

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

In depth use of partial - chapter 3 #20

Closed pertrai1 closed 8 years ago

pertrai1 commented 8 years ago

You make it a point to understand the partial function, and i find that it would be good to get an understanding of a use case of how it would be used.

When the partiallyApplied(..) function is later executed somewhere else in your program, it uses the closed over fn to execute the original function, first providing any of the (closed over) presetArgs partial application arguments, then any further laterArgs arguments.

getify commented 8 years ago

Did you read further and find that the explanation was sufficient?

pertrai1 commented 8 years ago

Yeah I got overzealous in stopping where you said to stop and understand. At that point I felt I needed to see it in action to fully understand. Read a bit further and then did see it being used.