FIxed the timer and the example

This commit is contained in:
2023-10-12 15:01:19 +01:00
parent cb395da894
commit ff486a5f74
3 changed files with 10 additions and 8 deletions

View File

@@ -1,7 +0,0 @@
import system::async::(set_timer, yield)
import system::io::(readln, println)
const main := (
set_timer true 1 (println "y" yield)
\cancel. readln \a. cancel
)

9
examples/yes/main.orc Normal file
View File

@@ -0,0 +1,9 @@
import system::async::(set_timer, yield)
import system::io::(readln, println)
import std::exit_status
const main := (
set_timer true 1 (println "y" yield) \cancel.
readln \a.
cancel exit_status::success
)