Make examples runnable
* Also drop args from fun main
diff --git a/docs/select-expression.md b/docs/select-expression.md
index 55437f9..842ab3a 100644
--- a/docs/select-expression.md
+++ b/docs/select-expression.md
@@ -108,7 +108,7 @@
<div class="sample" markdown="1" theme="idea" data-highlight-only>
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> {
+fun main() = runBlocking<Unit> {
val fizz = fizz()
val buzz = buzz()
repeat(7) {
@@ -175,7 +175,7 @@
<div class="sample" markdown="1" theme="idea" data-highlight-only>
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> {
+fun main() = runBlocking<Unit> {
val a = produce<String> {
repeat(4) { send("Hello $it") }
}
@@ -251,7 +251,7 @@
<div class="sample" markdown="1" theme="idea" data-highlight-only>
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> {
+fun main() = runBlocking<Unit> {
val side = Channel<Int>() // allocate side channel
launch { // this is a very fast consumer for the side channel
side.consumeEach { println("Side channel has $it") }
@@ -329,7 +329,7 @@
<div class="sample" markdown="1" theme="idea" data-highlight-only>
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> {
+fun main() = runBlocking<Unit> {
val list = asyncStringsList()
val result = select<String> {
list.withIndex().forEach { (index, deferred) ->
@@ -414,7 +414,7 @@
<div class="sample" markdown="1" theme="idea" data-highlight-only>
```kotlin
-fun main(args: Array<String>) = runBlocking<Unit> {
+fun main() = runBlocking<Unit> {
val chan = Channel<Deferred<String>>() // the channel for test
launch { // launch printing coroutine
for (s in switchMapDeferreds(chan))