# Chapter 6: Throttle, playground results differ from the book results

**URL:** <https://forums.kodeco.com/t/chapter-6-throttle-playground-results-differ-from-the-book-results/97545>\
**Category:** Combine: Asynchronous Programming with Swift\
**Created:** [February 9, 2020, 2:52pm UTC](https://forums.kodeco.com/t/chapter-6-throttle-playground-results-differ-from-the-book-results/97545 "2020-02-09T14:52:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![filiplazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/filiplazov/32/81494_2.png) [@filiplazov](https://forums.kodeco.com/u/filiplazov)\
**Post date:** [February 9, 2020, 2:52pm UTC](https://forums.kodeco.com/t/chapter-6-throttle-playground-results-differ-from-the-book-results/97545/1 "2020-02-09T14:52:03Z")

</div>

Hello,  
First and foremost, I am really happy with the book and I think you did an outstanding job!  
I am reading the book and going through all the examples in the playground and I noticed that in Chapter 6 for the throttle examples the playground produce different results than the book. I even tried the Final.playground to eliminate any error I might have introduced myself.  
This is the view output from the live view:

![image](https://files.chunter.kodeco.com/original/3X/4/4/443ce3f87ba882a628e4713fd1b33b996078cae4.png)

And in the book:

![image](https://files.chunter.kodeco.com/original/3X/1/5/15f72eea4d7ddcbb7cadbbbacef83d92f5ae0790.png)

The result from the debug console from the playground:

```auto
+0.0s: Subject emitted: H
+0.0s: Throttle emitted: H
+0.1s: Subject emitted: He
+0.2s: Subject emitted: Hel
+0.3s: Subject emitted: Hell
+0.5s: Subject emitted: Hello
+0.6s: Subject emitted: Hello 
+1.1s: Throttle emitted: He
+2.2s: Subject emitted: Hello W
+2.2s: Subject emitted: Hello Wo
+2.2s: Throttle emitted: Hello W
+2.4s: Subject emitted: Hello Wor
+2.4s: Subject emitted: Hello Worl
+2.7s: Subject emitted: Hello World
+3.4s: Throttle emitted: Hello Wor

```

and the one from the book:

```auto
“+0.0s: Subject emitted: H
+0.1s: Subject emitted: He
+0.2s: Subject emitted: Hel
+0.3s: Subject emitted: Hell
+0.5s: Subject emitted: Hello
+0.6s: Subject emitted: Hello 
+1.0s: Throttled emitted: H
+2.2s: Subject emitted: Hello W
+2.2s: Subject emitted: Hello Wo
+2.2s: Subject emitted: Hello Wor
+2.4s: Subject emitted: Hello Worl
+2.7s: Subject emitted: Hello World
+3.0s: Throttled emitted: Hello W”

Excerpt From: By Marin Todorov. “Combine.” Apple Books. 

```

I am a beginner in Combine but the results I get from the playground makes more sense than what is explained in the book.  
I am using Xcode 11.3.1 with macOS 10.15.3 and reading what is at the time of writing the latest version of the book 1.0.2

Thank you!

---

<div class="post-metadata">

**Author:** ![filiplazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/filiplazov/32/81494_2.png) [@filiplazov](https://forums.kodeco.com/u/filiplazov)\
**Post date:** [February 9, 2020, 3:09pm UTC](https://forums.kodeco.com/t/chapter-6-throttle-playground-results-differ-from-the-book-results/97545/2 "2020-02-09T15:09:56Z")

</div>

I noticed that throttle will always fire the first value if there is any no matter if `latest` is set to `true` or `false`. What differs in the next throttle event after 1 second is the “index” of the sequence of values published differs depending on the `latest` parameter which can either be the first or last index after the last fired value.

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [March 31, 2020, 2:39am UTC](https://forums.kodeco.com/t/chapter-6-throttle-playground-results-differ-from-the-book-results/97545/3 "2020-03-31T02:39:45Z")

</div>

@fpillet Can you please help with this when you get a chance? Thank you - much appreciated! :]
