Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Create a Combine Publisher From a ClosedRange

Create a Combine Publisher From a ClosedRange

Daily Coding Tip 128

Millie Sturgeon's avatar
Millie Sturgeon
Jul 10, 2022
∙ Paid

Share this post

Type Safely
Type Safely
Create a Combine Publisher From a ClosedRange
Share
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…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share