Hey buddy this is Caleb with Deb's Lopes.
You didn't think you were getting off that easy did you.
I have a challenge for you before we go on to the next section.
So go ahead and pull open your r x playground.
We're going to challenge you or I'm going to challenge you to play around with observables and to do
something for me.
So I'm actually going to start by renaming this observables and let's hope that it doesn't crash on
me.
But changing the name looks like it's fine.
All right.
So right click and click new playground page.
We're going to call this observable as challenge and like before.
We're going to go ahead and select all and delete although I guess you have to select one with the number
one of the lines with the numbers.
Select all and delete.
Then you're going to need to import our X swift import playground.
I can't type.
Playground support and then call playground page dot current dot needs indefinite execution.
Equals true.
Just like we've been doing.
Then here are your directions.
1.
Create a Dispose begge instance call Dispose bag then create an observable that holds an array of int
values.
Then create a constant and subscribe to the observable using on next after that.
Inside the brackets of the next closure.
Create a constant and set its value to be Dollar Sign 0 multiplied by 5.
Remember the dollar signs zero is used to capture each value from the arrays it goes through as a temporary
variable.
Then print the constant that is dollar signs 0 multiplied by 5 and at the end.
Call this call add disposable to and pass in your dispose bag.
That is your challenge.
Go at it now.
I'll see in the next section when we talk about subjects.
Good luck.