Skip to content

Instantly share code, notes, and snippets.

@mmuszynski
Created March 5, 2021 14:02
Show Gist options
  • Save mmuszynski/ed45b752fd261ae5a6adce6b3c0f5b75 to your computer and use it in GitHub Desktop.
Save mmuszynski/ed45b752fd261ae5a6adce6b3c0f5b75 to your computer and use it in GitHub Desktop.
for x in 1...5 {
print("\(x)")
}
// Output:
// 1
// 2
// 3
// 4
// 5
Just(1...5)
.map { Array($0) }
.flatMap { Just($0) }
.handleEvents(receiveOutput: {
print($0)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment