Skip to content

Commit

Permalink
Regenerate ParZip Knit examples (arrow-kt#2821)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgtout committed Jan 20, 2023
1 parent 40bd997 commit 7d3ad0d
Show file tree
Hide file tree
Showing 23 changed files with 274 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ suspend fun main(): Unit {
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" }
) { a, b ->
"$a\n$b"
}
)
//sampleEnd
println(result)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
package arrow.fx.coroutines.examples.exampleParzip03

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" }
) { a, b, c ->
"$a\n$b\n$c"
{ "Second one is on ${Thread.currentThread().name}" }
) { a, b ->
"$a\n$b"
}
//sampleEnd
println(result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
package arrow.fx.coroutines.examples.exampleParzip04

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
package arrow.fx.coroutines.examples.exampleParzip05

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" }
) { a, b, c, d ->
"$a\n$b\n$c\n$d"
}
{ "Second one is on ${Thread.currentThread().name}" }
{ "Third one is on ${Thread.currentThread().name}" }
)
//sampleEnd
println(result)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ suspend fun main(): Unit {
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" }
) { a, b, c, d ->
"$a\n$b\n$c\n$d"
{ "Third one is on ${Thread.currentThread().name}" }
) { a, b, c ->
"$a\n$b\n$c"
}
//sampleEnd
println(result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ suspend fun main(): Unit {
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e ->
"$a\n$b\n$c\n$d\n$e"
{ "Fourth one is on ${Thread.currentThread().name}" }
) { a, b, c, d ->
"$a\n$b\n$c\n$d"
}
//sampleEnd
println(result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ suspend fun main(): Unit {
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e ->
"$a\n$b\n$c\n$d\n$e"
}
{ "Second one is on ${Thread.currentThread().name}" }
{ "Third one is on ${Thread.currentThread().name}" }
{ "Fourth one is on ${Thread.currentThread().name}" }
)
//sampleEnd
println(result)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
package arrow.fx.coroutines.examples.exampleParzip09

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f ->
"$a\n$b\n$c\n$d\n$e\n$f"
{ "Fourth one is on ${Thread.currentThread().name}" }
) { a, b, c, d ->
"$a\n$b\n$c\n$d"
}
//sampleEnd
println(result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@
package arrow.fx.coroutines.examples.exampleParzip10

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, g ->
"$a\n$b\n$c\n$d\n$e\n$g"
{ "Fifth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e ->
"$a\n$b\n$c\n$d\n$e"
}
//sampleEnd
println(result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@
package arrow.fx.coroutines.examples.exampleParzip11

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, g, h ->
"$a\n$b\n$c\n$d\n$e\n$g\n$h"
}
{ "Second one is on ${Thread.currentThread().name}" }
{ "Third one is on ${Thread.currentThread().name}" }
{ "Fourth one is on ${Thread.currentThread().name}" }
{ "Fifth one is on ${Thread.currentThread().name}" }
)
//sampleEnd
println(result)
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ suspend fun main(): Unit {
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f, g ->
"$a\n$b\n$c\n$d\n$e\n$f\n$g"
{ "Fifth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e ->
"$a\n$b\n$c\n$d\n$e"
}
//sampleEnd
println(result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ suspend fun main(): Unit {
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" },
{ "Eighth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f, g, h ->
"$a\n$b\n$c\n$d\n$e\n$f\n$g\n$h"
{ "Sixth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f ->
"$a\n$b\n$c\n$d\n$e\n$f"
}
//sampleEnd
println(result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ suspend fun main(): Unit {
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f, g ->
"$a\n$b\n$c\n$d\n$e\n$f\n$g"
}
{ "Second one is on ${Thread.currentThread().name}" }
{ "Third one is on ${Thread.currentThread().name}" }
{ "Fourth one is on ${Thread.currentThread().name}" }
{ "Fifth one is on ${Thread.currentThread().name}" }
{ "Sixth one is on ${Thread.currentThread().name}" }
)
//sampleEnd
println(result)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// This file was automatically generated from ParZip.kt by Knit tool. Do not edit.
package arrow.fx.coroutines.examples.exampleParzip15

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, g ->
"$a\n$b\n$c\n$d\n$e\n$g"
}
//sampleEnd
println(result)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// This file was automatically generated from ParZip.kt by Knit tool. Do not edit.
package arrow.fx.coroutines.examples.exampleParzip16

import arrow.fx.coroutines.*

suspend fun main(): Unit {
//sampleStart
val result = parZip(
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, g, h ->
"$a\n$b\n$c\n$d\n$e\n$g\n$h"
}
//sampleEnd
println(result)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// This file was automatically generated from ParZip.kt by Knit tool. Do not edit.
package arrow.fx.coroutines.examples.exampleParzip17

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" }
{ "Third one is on ${Thread.currentThread().name}" }
{ "Fourth one is on ${Thread.currentThread().name}" }
{ "Fifth one is on ${Thread.currentThread().name}" }
{ "Sixth one is on ${Thread.currentThread().name}" }
{ "Seventh one is on ${Thread.currentThread().name}" }
)
//sampleEnd
println(result)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// This file was automatically generated from ParZip.kt by Knit tool. Do not edit.
package arrow.fx.coroutines.examples.exampleParzip18

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f, g ->
"$a\n$b\n$c\n$d\n$e\n$f\n$g"
}
//sampleEnd
println(result)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// This file was automatically generated from ParZip.kt by Knit tool. Do not edit.
package arrow.fx.coroutines.examples.exampleParzip19

import arrow.fx.coroutines.*

suspend fun main(): Unit {
//sampleStart
val result = parZip(
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" },
{ "Third one is on ${Thread.currentThread().name}" },
{ "Fourth one is on ${Thread.currentThread().name}" },
{ "Fifth one is on ${Thread.currentThread().name}" },
{ "Sixth one is on ${Thread.currentThread().name}" },
{ "Seventh one is on ${Thread.currentThread().name}" },
{ "Eighth one is on ${Thread.currentThread().name}" }
) { a, b, c, d, e, f, g, h ->
"$a\n$b\n$c\n$d\n$e\n$f\n$g\n$h"
}
//sampleEnd
println(result)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// This file was automatically generated from ParZip.kt by Knit tool. Do not edit.
package arrow.fx.coroutines.examples.exampleParzip20

import arrow.fx.coroutines.*
import kotlinx.coroutines.Dispatchers

suspend fun main(): Unit {
//sampleStart
val result = parZip(
Dispatchers.IO,
{ "First one is on ${Thread.currentThread().name}" },
{ "Second one is on ${Thread.currentThread().name}" }
{ "Third one is on ${Thread.currentThread().name}" }
{ "Fourth one is on ${Thread.currentThread().name}" }
{ "Fifth one is on ${Thread.currentThread().name}" }
{ "Sixth one is on ${Thread.currentThread().name}" }
{ "Seventh one is on ${Thread.currentThread().name}" }
{ "Eighth one is on ${Thread.currentThread().name}" }
)
//sampleEnd
println(result)
}
Loading

0 comments on commit 7d3ad0d

Please sign in to comment.