1 00:00:05,340 --> 00:00:06,120 Hello, everyone. 2 00:00:06,120 --> 00:00:07,110 Welcome back. 3 00:00:07,140 --> 00:00:13,800 I am in the Section 21 workspace and I'm in the Stateless Lambda Project. 4 00:00:14,550 --> 00:00:20,790 In this project I've got some examples of stateless lambdas that I'm using in different ways, and I've 5 00:00:20,790 --> 00:00:26,280 got some using value parameter as a reference parameter as passing objects and returning lambdas and 6 00:00:26,280 --> 00:00:26,910 so forth. 7 00:00:26,910 --> 00:00:31,260 So I'll go through them one at a time and I've already gone ahead and built and run. 8 00:00:31,260 --> 00:00:32,850 So you can see the run over here on the right. 9 00:00:32,850 --> 00:00:34,470 And I'm just going to walk through this. 10 00:00:34,470 --> 00:00:39,660 There are seven little test functions that I've written, that kind of exercise, a whole bunch of different 11 00:00:39,660 --> 00:00:41,490 combinations of stateless lambdas. 12 00:00:41,490 --> 00:00:43,110 So you can get a pretty good feel for them. 13 00:00:43,110 --> 00:00:46,680 But before I talk about those little functions, let's talk about what's going on here. 14 00:00:46,680 --> 00:00:51,030 So it's important to keep in mind that we are working with stateless lambda expressions. 15 00:00:51,030 --> 00:00:54,210 So that means that the capture lists are empty, they're going to be empty. 16 00:00:54,210 --> 00:00:59,340 For all of the examples in here, you can see here that I've included IO stream, string and vector. 17 00:00:59,340 --> 00:01:01,800 These are just common includes that I'm going to use throughout. 18 00:01:01,800 --> 00:01:07,890 I'm also including algorithm which gives us the standard template library algorithms and here is the 19 00:01:07,890 --> 00:01:08,970 functional header. 20 00:01:08,970 --> 00:01:13,860 This is the one we need for function and this is the one I mentioned in the slides in the previous lecture. 21 00:01:13,860 --> 00:01:19,230 So those are my includes and here have defined a real simple class person and this is the one that I'm 22 00:01:19,230 --> 00:01:23,280 going to use in some of the examples where we're passing objects within the Lambdas. 23 00:01:23,280 --> 00:01:25,350 So here's my class person. 24 00:01:25,350 --> 00:01:31,110 I have a friend function that's just my overloaded insertion operator that lets us display these person 25 00:01:31,110 --> 00:01:34,530 objects to a stream and you can see it implemented down here. 26 00:01:34,560 --> 00:01:35,390 Nothing new. 27 00:01:35,400 --> 00:01:37,680 This is all stuff we have already done before. 28 00:01:37,710 --> 00:01:44,280 You can see that the person class has these two attributes a name which is a string and the person's 29 00:01:44,280 --> 00:01:45,870 age really simple. 30 00:01:45,870 --> 00:01:48,540 We've got a constructor that expects a name and an age. 31 00:01:48,810 --> 00:01:55,200 We've got a copy constructor, we've got a destructor, which I'm just letting the compiler create the 32 00:01:55,200 --> 00:01:58,080 default for me, since there's nothing special to do here. 33 00:01:58,080 --> 00:02:01,170 And then right here I've got my getters in my setters, right? 34 00:02:01,170 --> 00:02:04,800 So I'm going to I've got my name, set name, get age, set age. 35 00:02:05,010 --> 00:02:05,220 Okay. 36 00:02:05,340 --> 00:02:08,460 So now that that's out of the way, you can see it's really straightforward. 37 00:02:08,460 --> 00:02:10,440 I'll refer back to this when we get to it. 38 00:02:10,470 --> 00:02:16,530 You can see down here in my main, what I'm doing is I'm calling these functions all the way from test 39 00:02:16,530 --> 00:02:18,390 one, all the way to test seven. 40 00:02:18,390 --> 00:02:22,770 So I'm going to walk through them one at a time and each one adds a little bit and changes a little 41 00:02:22,770 --> 00:02:27,930 bit just so you can get a good feel for the differences between the stateless lambda expressions that 42 00:02:27,930 --> 00:02:28,710 I'm going to show you. 43 00:02:29,070 --> 00:02:29,430 All right. 44 00:02:29,430 --> 00:02:34,950 So let me start with test one and I'm going to scroll up to it and here is test one. 45 00:02:35,160 --> 00:02:40,740 And you can see over here and the output right up here, that's the output for test one. 46 00:02:40,740 --> 00:02:43,080 So that's what I'll be referring to as I walk through this. 47 00:02:43,260 --> 00:02:44,190 Real simple. 48 00:02:44,190 --> 00:02:46,320 We have no capture list. 49 00:02:46,440 --> 00:02:48,450 None of these guys are capturing anything. 50 00:02:48,450 --> 00:02:49,680 That's why they're stateless. 51 00:02:49,680 --> 00:02:56,880 We have no parameters and the body of the lambda just says, see out high in this case. 52 00:02:56,880 --> 00:02:57,990 So it's just going to display. 53 00:02:57,990 --> 00:03:01,620 Hi, we are instantiating it right there. 54 00:03:01,620 --> 00:03:03,330 It's really important that we use that. 55 00:03:03,330 --> 00:03:07,200 Otherwise it's not doing anything at this point. 56 00:03:07,200 --> 00:03:13,380 Now that lambda expression will execute and high is displayed, you can see it right there. 57 00:03:13,530 --> 00:03:15,420 Same idea with this guy here. 58 00:03:15,420 --> 00:03:17,490 Except now we've got a parameter. 59 00:03:17,490 --> 00:03:21,300 We've got an integer parameter x again, stateless, right? 60 00:03:21,330 --> 00:03:27,750 So this is a parameter X and we are displaying X, that's the body of the lambda. 61 00:03:27,750 --> 00:03:33,930 So whatever value is in here will be displayed here when we display the output statement. 62 00:03:33,960 --> 00:03:36,000 Now same idea over here. 63 00:03:36,000 --> 00:03:40,080 We're calling that lambda and we're passing in 100. 64 00:03:40,080 --> 00:03:43,320 This 100 is being passed in here. 65 00:03:44,230 --> 00:03:44,470 Right. 66 00:03:44,480 --> 00:03:46,090 So now X gets the 100. 67 00:03:46,090 --> 00:03:49,240 And when this body executes, we're going to display 100. 68 00:03:49,240 --> 00:03:51,310 And that's exactly what's happening here. 69 00:03:51,970 --> 00:03:52,330 All right. 70 00:03:52,330 --> 00:03:54,040 So let's look at the third example. 71 00:03:54,580 --> 00:03:57,340 Same idea, except now I've got two parameters. 72 00:03:57,340 --> 00:03:58,600 I've got an X and a Y. 73 00:03:58,630 --> 00:04:01,390 So we're displaying the X plus the Y over here. 74 00:04:01,390 --> 00:04:02,530 We're just adding them up. 75 00:04:02,560 --> 00:04:03,730 We're displaying the sum. 76 00:04:03,820 --> 00:04:09,610 You see, the 100 is being passed over here to the X, the 200 is being passed into the Y. 77 00:04:09,640 --> 00:04:12,070 All this is happening by value, right? 78 00:04:12,070 --> 00:04:13,420 There's no references in here. 79 00:04:13,420 --> 00:04:14,530 This is by value. 80 00:04:14,530 --> 00:04:15,940 So we're doing copies. 81 00:04:16,240 --> 00:04:21,010 And what we're going to do is 100 plus 200 and this guy will display 300. 82 00:04:21,010 --> 00:04:22,720 And that's what you're seeing right here. 83 00:04:24,520 --> 00:04:28,900 So that's a real, real simple example of lambda expressions. 84 00:04:30,100 --> 00:04:31,810 Simple, but very useful, right? 85 00:04:31,810 --> 00:04:33,160 You can see it's kind of silly. 86 00:04:33,160 --> 00:04:34,180 Well, why would you do this? 87 00:04:34,180 --> 00:04:40,180 You know, you just it's kind of contrived, if you will, and nobody really writes lambda expressions 88 00:04:40,180 --> 00:04:40,750 this way. 89 00:04:40,750 --> 00:04:44,110 It's more of what I'm going to show you in a little bit, but this gives you a good feeling for the 90 00:04:44,110 --> 00:04:47,560 structure and the syntax of the lambda expressions. 91 00:04:47,620 --> 00:04:49,360 They're not complicated. 92 00:04:49,360 --> 00:04:53,770 You've got the capture list, you've got the parameter list, you've got the body of the lambda. 93 00:04:53,770 --> 00:04:54,940 That's what it's like. 94 00:04:55,360 --> 00:04:59,380 It can get more complicated and what we're doing captures and we'll do that in the next video. 95 00:04:59,950 --> 00:05:04,090 So let me show you now test to let me close this piece down. 96 00:05:04,210 --> 00:05:10,480 And here I've got test two and you can see here what I'm doing is using values and references now for 97 00:05:10,480 --> 00:05:11,020 the parameter. 98 00:05:11,020 --> 00:05:14,950 So it's going to be a little bit different because we're going to be using reference parameters in this 99 00:05:14,950 --> 00:05:15,700 case. 100 00:05:15,910 --> 00:05:17,890 I've got a variable here. 101 00:05:18,830 --> 00:05:24,050 What I'm doing over here is I've got a lambda expression and I'm assigning that land expression to a 102 00:05:24,050 --> 00:05:24,690 variable. 103 00:05:24,710 --> 00:05:30,380 This is the same thing as saying something like X equals three plus five. 104 00:05:30,380 --> 00:05:34,430 I'm evaluating that expression and assigning it to x. 105 00:05:34,520 --> 00:05:36,970 Later on, when I use x, I'm going to be using eight. 106 00:05:36,980 --> 00:05:37,390 Right? 107 00:05:37,400 --> 00:05:39,270 This is exactly the same idea. 108 00:05:39,290 --> 00:05:41,980 This is a variable l one. 109 00:05:41,990 --> 00:05:47,030 What's important here is I'm using the auto keyword to tell the compiler, hey, compiler, you figure 110 00:05:47,030 --> 00:05:48,470 out what the type of this thing is. 111 00:05:48,470 --> 00:05:49,100 It's a lambda. 112 00:05:49,100 --> 00:05:52,220 It's not an end, it's not a void, it's not a double, it's a lambda. 113 00:05:52,250 --> 00:05:54,530 Let the compiler figure out how to do it. 114 00:05:54,710 --> 00:05:55,490 Same idea. 115 00:05:55,490 --> 00:05:56,960 It's the same lambda as before. 116 00:05:56,990 --> 00:05:57,950 Notice the difference though. 117 00:05:57,950 --> 00:06:00,170 We don't have that piece at the end, right? 118 00:06:00,170 --> 00:06:07,340 So what we're doing is we're creating that lambda expression and we're assigning it to L one now whenever 119 00:06:07,340 --> 00:06:11,960 I want to call it now, I could just say L one with the parents. 120 00:06:12,080 --> 00:06:15,140 It looks just like a function call and essentially it is. 121 00:06:15,140 --> 00:06:19,910 Remember we talked about overloading the function call operator Well, that's really what's happening 122 00:06:19,910 --> 00:06:20,870 behind the scenes. 123 00:06:20,870 --> 00:06:27,800 So at this point, right here, not here, but right there on line 45, that's when we get the high 124 00:06:27,800 --> 00:06:28,160 here. 125 00:06:28,160 --> 00:06:29,510 So hopefully that's clear. 126 00:06:29,510 --> 00:06:32,750 And in this case now let's look at lines 47, 48. 127 00:06:32,750 --> 00:06:37,520 We have two integers, number one and number two, and each one is been initialized to 100. 128 00:06:38,300 --> 00:06:44,450 I'm creating another variable L two right here, which is also a lambda right. 129 00:06:44,450 --> 00:06:45,860 Again, stateless. 130 00:06:45,860 --> 00:06:49,610 I've got two parameters by value and I'm doing the same thing. 131 00:06:49,610 --> 00:06:50,240 X plus y. 132 00:06:50,270 --> 00:06:53,210 Set an example I used earlier, but now look what I'm doing. 133 00:06:53,240 --> 00:06:57,260 I'm calling it some pass l two and then I'm passing at ten and a 20. 134 00:06:57,260 --> 00:07:00,440 So the ten gets over here and the 20 comes over here. 135 00:07:00,440 --> 00:07:05,330 This guy is going to be 30 and that's what's going to display right here. 136 00:07:05,450 --> 00:07:07,400 We get that 30 displayed. 137 00:07:08,150 --> 00:07:13,550 Now, those are two integer literals and that's perfectly valid in this case. 138 00:07:13,550 --> 00:07:14,540 We've got number one. 139 00:07:14,540 --> 00:07:15,170 Number two. 140 00:07:15,200 --> 00:07:18,980 So now we're going to pass in instead of ten and 20, 101 hundred. 141 00:07:18,980 --> 00:07:19,460 Right? 142 00:07:19,670 --> 00:07:23,450 So we're going to display 200, which is what's being displayed here. 143 00:07:24,140 --> 00:07:26,480 Remember, this is passed by value. 144 00:07:26,480 --> 00:07:27,650 This is your value parameter. 145 00:07:27,650 --> 00:07:30,230 So we're making copies of these values. 146 00:07:30,770 --> 00:07:34,100 So now let's take a look at an example with some references. 147 00:07:34,100 --> 00:07:39,230 And now we are right here on line 54 and we've got the same idea. 148 00:07:39,230 --> 00:07:43,940 I've got a variable L three and we've got two parameters. 149 00:07:43,940 --> 00:07:48,140 Now the difference is now X is a reference parameter. 150 00:07:48,140 --> 00:07:49,230 We know what those are, right? 151 00:07:49,250 --> 00:07:50,930 We've talked about them already in the class. 152 00:07:51,170 --> 00:07:58,160 It's basically an alias to an actual parameter and I have Y, which is a value type parameter. 153 00:07:58,520 --> 00:08:02,990 And all this lambda does, it's going to display X and then it's going to display Y. 154 00:08:03,410 --> 00:08:07,130 But within the body of the lamb that we're changing X and Y. 155 00:08:07,130 --> 00:08:09,080 Now, this is really important to understand. 156 00:08:09,230 --> 00:08:12,350 When I'm changing X, I've got a reference. 157 00:08:12,350 --> 00:08:17,960 So that means that the actual parameter is going to be changed to 1000. 158 00:08:18,530 --> 00:08:23,360 When I change Y to 2000, the local copy of y will be changed. 159 00:08:23,360 --> 00:08:24,620 So not the actual. 160 00:08:24,620 --> 00:08:27,230 So let me show you what that looks like when I call this. 161 00:08:27,230 --> 00:08:32,059 So at this point, remember, we're going to call this with number one and number two, and if you remember 162 00:08:32,059 --> 00:08:33,559 number one and number two or 100 each. 163 00:08:33,559 --> 00:08:34,039 Right? 164 00:08:34,039 --> 00:08:37,250 So what's going to happen is actually let me clear this up and do this one more time. 165 00:08:37,250 --> 00:08:38,120 So it's clearer. 166 00:08:38,419 --> 00:08:41,419 I've got number one and number two, which is each 100. 167 00:08:41,510 --> 00:08:45,200 Now I'm going to call L three with number one and number two. 168 00:08:45,650 --> 00:08:47,420 Number two is 100. 169 00:08:47,420 --> 00:08:49,880 So that becomes the Y. 170 00:08:50,820 --> 00:08:51,990 And that's copied. 171 00:08:52,000 --> 00:08:54,350 But number one is a reference, right? 172 00:08:54,360 --> 00:09:00,690 So what happens is this guy now refers to the actual parameter up here. 173 00:09:01,410 --> 00:09:03,120 This guy is just local. 174 00:09:04,200 --> 00:09:05,190 That's really important. 175 00:09:05,190 --> 00:09:06,570 It's a very important distinction. 176 00:09:06,570 --> 00:09:10,590 We learned about this when we used functions exactly the same thing. 177 00:09:10,590 --> 00:09:13,260 So at this point, we're going to execute this code. 178 00:09:13,260 --> 00:09:14,760 This code is going to change. 179 00:09:14,880 --> 00:09:17,970 First of all, it's going to display X and Y, which are 101 hundred. 180 00:09:17,970 --> 00:09:18,120 Right. 181 00:09:18,120 --> 00:09:19,140 Because I haven't changed them. 182 00:09:19,140 --> 00:09:20,520 You can see it right there. 183 00:09:21,090 --> 00:09:23,580 Then it's going to change X to 1000. 184 00:09:23,580 --> 00:09:24,810 That's this guy right here. 185 00:09:24,810 --> 00:09:26,430 So this guy is going to be 1000. 186 00:09:27,060 --> 00:09:30,120 He's going to change Y to 2000, which is this guy. 187 00:09:30,330 --> 00:09:33,210 It's irrelevant because that's going to go away when the -- is finished. 188 00:09:33,240 --> 00:09:34,710 Now we're done. 189 00:09:34,710 --> 00:09:39,030 So what happens is all of this gets cleaned up and the only thing that's left behind is this guy is 190 00:09:39,030 --> 00:09:39,990 1000. 191 00:09:40,140 --> 00:09:42,390 Number one is 1000, number two is 100. 192 00:09:42,780 --> 00:09:46,920 So when we come back, we're just going to display number one and number two. 193 00:09:46,920 --> 00:09:51,300 And you can see right here, we're getting the 1000, which we changed and the 100. 194 00:09:52,610 --> 00:09:52,850 Okay. 195 00:09:52,880 --> 00:09:53,960 Hopefully that's pretty clear. 196 00:09:53,960 --> 00:09:56,210 If not, just walk through it yourself, just like I did. 197 00:09:56,210 --> 00:09:59,030 And that way you'll get a really, really good feeling of what's going on here. 198 00:09:59,170 --> 00:10:01,580 Okay, so let's move on to test three. 199 00:10:01,910 --> 00:10:02,450 All right. 200 00:10:02,450 --> 00:10:04,100 So what are we doing in test three? 201 00:10:04,730 --> 00:10:11,540 We're basically doing the same thing we did in Test two, except we're using objects now instead of 202 00:10:11,540 --> 00:10:12,580 primitive types. 203 00:10:12,590 --> 00:10:14,290 The other example, we used integers. 204 00:10:14,300 --> 00:10:16,270 So what's going on here? 205 00:10:16,280 --> 00:10:22,460 Well, I'm going to create a person object called stooge, and that would be Larry and Larry's 18 years 206 00:10:22,460 --> 00:10:22,820 old. 207 00:10:22,820 --> 00:10:26,930 And then I want to display Stooge here, so run on line 68. 208 00:10:26,930 --> 00:10:28,160 I'm in test three. 209 00:10:28,340 --> 00:10:30,230 This is what's happening right there. 210 00:10:30,230 --> 00:10:31,970 That one line is executing. 211 00:10:33,190 --> 00:10:35,200 Larry, 18, just what we expect. 212 00:10:35,290 --> 00:10:37,110 Now I'm creating a lambda. 213 00:10:37,120 --> 00:10:38,410 I'll call it L four. 214 00:10:39,040 --> 00:10:43,300 In this example, here we are passing in a person object. 215 00:10:43,540 --> 00:10:45,250 This is really important. 216 00:10:45,250 --> 00:10:47,140 This is by value. 217 00:10:47,890 --> 00:10:49,230 So what happens here? 218 00:10:49,240 --> 00:10:50,230 A copy. 219 00:10:50,530 --> 00:10:52,270 And how do we copy objects? 220 00:10:52,300 --> 00:10:54,070 Copy constructor. 221 00:10:55,360 --> 00:10:59,960 The copy constructor will be called and it will create a new copy of that object. 222 00:10:59,980 --> 00:11:03,910 That copy of the object will be alive within the body of the lambda. 223 00:11:03,940 --> 00:11:07,200 We can change it all we want in there and it's not going to affect the actual. 224 00:11:07,210 --> 00:11:08,340 That's really important. 225 00:11:08,350 --> 00:11:12,120 Same thing that it's happened with integers, but now we're dealing with objects. 226 00:11:12,130 --> 00:11:15,520 So now what am I passing into L for stooge? 227 00:11:16,360 --> 00:11:19,840 So now what's happening is I get a new version, right? 228 00:11:19,840 --> 00:11:22,240 A new copy of that stooge object. 229 00:11:22,240 --> 00:11:30,970 So inside this function here I have P and P would be Larry 18, which is totally separate from this. 230 00:11:30,970 --> 00:11:31,300 Larry. 231 00:11:31,330 --> 00:11:31,720 18. 232 00:11:31,720 --> 00:11:35,050 This is a new copy and that's active. 233 00:11:35,050 --> 00:11:38,110 So I'm going to display it and it's going to display right there. 234 00:11:38,110 --> 00:11:39,820 That's the second display statement, right? 235 00:11:39,820 --> 00:11:41,140 The first one was up here. 236 00:11:42,750 --> 00:11:43,650 And that's it. 237 00:11:43,680 --> 00:11:45,360 Stooge did not change. 238 00:11:45,570 --> 00:11:47,640 It can't change because we made a copy of it. 239 00:11:48,330 --> 00:11:50,790 Now let's do it by reference and see the difference. 240 00:11:52,390 --> 00:11:54,330 I'm right here on line 75. 241 00:11:54,360 --> 00:11:58,170 Remember, we've already executed that one and we've executed that statement right over here. 242 00:11:58,170 --> 00:11:59,010 So now I'm over here. 243 00:11:59,010 --> 00:12:00,180 L five again. 244 00:12:00,180 --> 00:12:01,060 Stateless. 245 00:12:01,080 --> 00:12:03,120 One parameter. 246 00:12:03,270 --> 00:12:04,650 A reference parameter. 247 00:12:04,650 --> 00:12:06,550 Really, really different now, right? 248 00:12:06,570 --> 00:12:07,140 No copy. 249 00:12:07,140 --> 00:12:08,580 Constructor, no copy. 250 00:12:08,610 --> 00:12:11,070 We're going to get an alias at this point. 251 00:12:11,070 --> 00:12:12,420 We also said it's const. 252 00:12:12,420 --> 00:12:17,040 So if we try to change that P object and here in the body, we won't be allowed. 253 00:12:17,040 --> 00:12:18,360 The compiler will give us an error. 254 00:12:18,810 --> 00:12:20,250 So let's do this. 255 00:12:20,250 --> 00:12:22,700 L five We're going to pass in stooge. 256 00:12:22,710 --> 00:12:24,470 We don't make a copy of it. 257 00:12:24,480 --> 00:12:28,350 This P refers to the real one. 258 00:12:28,350 --> 00:12:30,060 So again, very efficient. 259 00:12:30,060 --> 00:12:31,830 I can't change it because it's const. 260 00:12:31,830 --> 00:12:33,730 So I get the best of both worlds, right? 261 00:12:33,750 --> 00:12:36,090 When I'm in here, I'm displaying p. 262 00:12:36,120 --> 00:12:38,760 P is right there, Larry 18. 263 00:12:38,760 --> 00:12:42,390 And you can see that third statement executes right there. 264 00:12:42,660 --> 00:12:44,490 So that's passed by reference. 265 00:12:44,490 --> 00:12:47,850 Now let's do pass by reference, but actually modify the object. 266 00:12:47,850 --> 00:12:50,790 And that's what this last statement here does. 267 00:12:50,940 --> 00:12:53,790 And let me scroll up just a little bit so you can see it a little bit better. 268 00:12:53,790 --> 00:12:59,550 So remember, at this point, we've done this, this, this, and we are right here now. 269 00:13:00,390 --> 00:13:03,180 So my lambda variable is l six. 270 00:13:03,240 --> 00:13:06,810 I'm passing in a person object by reference. 271 00:13:07,560 --> 00:13:11,010 Really important notice there's no contact over here like there was over here. 272 00:13:11,010 --> 00:13:13,440 I'm able to modify that and I'm going to modify that. 273 00:13:13,440 --> 00:13:15,240 So I'm going to pass in stooge. 274 00:13:15,480 --> 00:13:17,940 This P will be stooge, right? 275 00:13:17,940 --> 00:13:21,270 So it's going to be a reference to stooge and it's defined up there. 276 00:13:21,270 --> 00:13:26,130 It scrolled off, but it was stooge and it was Larry 18. 277 00:13:26,490 --> 00:13:27,750 That's my object. 278 00:13:28,650 --> 00:13:30,240 But now look what I'm doing in the body. 279 00:13:30,240 --> 00:13:33,240 I'm saying, hey, set the name to Frank. 280 00:13:33,240 --> 00:13:38,310 So I'm changing Larry to Frank and change the age to 25. 281 00:13:38,310 --> 00:13:46,350 So I'm changing the 18 to a 25, then I'm displaying P well, p is a reference to this guy, right? 282 00:13:46,350 --> 00:13:48,160 And notice right there what happens. 283 00:13:48,180 --> 00:13:53,580 Frank 25 Then once I finish, I'm going to display Stooge now. 284 00:13:53,580 --> 00:13:55,140 Well, that is stooge, right? 285 00:13:55,140 --> 00:13:56,340 So I'm going to get the same thing. 286 00:13:56,340 --> 00:14:03,240 So there's proof here in both cases, there's the proof that we actually changed that stooge variable 287 00:14:03,240 --> 00:14:06,750 out there from within the lambda because of that reference parameter. 288 00:14:07,380 --> 00:14:07,730 Okay. 289 00:14:07,800 --> 00:14:09,480 So this fit is getting a bit long now. 290 00:14:09,480 --> 00:14:13,560 So what I'm going to do is I'm going to stop this video here and we'll continue with test for in the 291 00:14:13,560 --> 00:14:14,160 next video. 292 00:14:14,160 --> 00:14:14,970 I'll see you there.