Type Safely

Type Safely

Create a Combine Publisher From a ClosedRange

Daily Coding Tip 128

Millie Sturgeon's avatar
Millie Sturgeon
Jul 10, 2022
∙ Paid
Image by valentin hintikka from Pixabay

There are various ways to easily create a Combine Publisher from placeholder data.

Originally I had intended to use an array of numbers for this, but I ended up just adding the numbers from 0 to 10 to an array, and there’s obviously a better way to do this. I’m using a ClosedRange, which Apple’s documentation descr…

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture