Transcript from the "Closure & Currying Exercise" Lesson
>> And in this exercise, we're going to work with some little functions that are going to create closures that break down one of these multiple argument functions, in this case one that's going to write a message basically a letter type thing assigned type of email type of deal.
[00:00:26] And in this case, we are observable is doing a little bit of the work for us to display that on the screen which we might consider as kind of side effect D, but we're still we're just returning this is actually basically a fancy string. You don't need to worry about the implementation here but we are gonna use this write message function to create some partially applied functions that are going to kind of lock in some of those values, like the person signing the letter, or the salutation like, see ya, or keep carrying on, things like that.
[00:01:04] And I wanna make sure, yes, so there's a couple of examples for you, at the top of this exercise on basic closures to give you a sense of how this works. And then your task is to fill in some to dos and implement these functions to get the rest of these letters or these messages to look how they are, how the first one to do, so we have a message, we have a salutation and then we have a person signing the letter.
[00:02:12] But we have to repeat ourselves a lot. We're repeating a lot of the same values repeating, repeating. So what we're gonna see in this exercise is how we can use currian to create a curried version of this quote function which then allows us to create more reusable functions that lock in some of these arguments and allow us to kind of simplify our code so that we don't have so much repetition, so that we don't have so many of these same values being passed in and we have shorter function signatures.
[00:02:42] So we have functions that take in maybe one or maybe two arguments instead of all three.