1
00:00:08,040 --> 00:00:10,540
Hey buddy this is Caleb with Deb's Lopes.

2
00:00:10,860 --> 00:00:13,240
You didn't think you were getting off that easy did you.

3
00:00:13,470 --> 00:00:16,090
I have a challenge for you before we go on to the next section.

4
00:00:16,110 --> 00:00:18,990
So go ahead and pull open your r x playground.

5
00:00:18,990 --> 00:00:24,060
We're going to challenge you or I'm going to challenge you to play around with observables and to do

6
00:00:24,060 --> 00:00:24,720
something for me.

7
00:00:24,720 --> 00:00:30,570
So I'm actually going to start by renaming this observables and let's hope that it doesn't crash on

8
00:00:30,570 --> 00:00:30,790
me.

9
00:00:30,810 --> 00:00:33,810
But changing the name looks like it's fine.

10
00:00:33,810 --> 00:00:34,160
All right.

11
00:00:34,160 --> 00:00:37,470
So right click and click new playground page.

12
00:00:37,620 --> 00:00:45,410
We're going to call this observable as challenge and like before.

13
00:00:45,440 --> 00:00:51,710
We're going to go ahead and select all and delete although I guess you have to select one with the number

14
00:00:51,860 --> 00:00:53,420
one of the lines with the numbers.

15
00:00:53,420 --> 00:00:55,520
Select all and delete.

16
00:00:55,520 --> 00:01:04,530
Then you're going to need to import our X swift import playground.

17
00:01:04,630 --> 00:01:05,960
I can't type.

18
00:01:05,970 --> 00:01:14,840
Playground support and then call playground page dot current dot needs indefinite execution.

19
00:01:14,860 --> 00:01:15,690
Equals true.

20
00:01:15,730 --> 00:01:17,620
Just like we've been doing.

21
00:01:17,620 --> 00:01:20,770
Then here are your directions.

22
00:01:20,800 --> 00:01:21,730
1.

23
00:01:21,730 --> 00:01:28,960
Create a Dispose begge instance call Dispose bag then create an observable that holds an array of int

24
00:01:29,080 --> 00:01:30,120
values.

25
00:01:30,340 --> 00:01:36,410
Then create a constant and subscribe to the observable using on next after that.

26
00:01:36,430 --> 00:01:39,520
Inside the brackets of the next closure.

27
00:01:39,640 --> 00:01:45,460
Create a constant and set its value to be Dollar Sign 0 multiplied by 5.

28
00:01:45,460 --> 00:01:51,460
Remember the dollar signs zero is used to capture each value from the arrays it goes through as a temporary

29
00:01:51,460 --> 00:01:52,520
variable.

30
00:01:52,570 --> 00:01:58,090
Then print the constant that is dollar signs 0 multiplied by 5 and at the end.

31
00:01:58,090 --> 00:02:02,990
Call this call add disposable to and pass in your dispose bag.

32
00:02:03,250 --> 00:02:04,640
That is your challenge.

33
00:02:04,660 --> 00:02:05,550
Go at it now.

34
00:02:05,800 --> 00:02:08,970
I'll see in the next section when we talk about subjects.

35
00:02:08,980 --> 00:02:09,340
Good luck.
