Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Sleep/Scheme/sleep.ss
Normal file
11
Task/Sleep/Scheme/sleep.ss
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(use format)
|
||||
(use srfi-18)
|
||||
|
||||
(format #t "Enter a time (in seconds): ")
|
||||
(let ((time (read))) ; converts input to a number, if possible
|
||||
(if (number? time)
|
||||
(begin
|
||||
(format #t "Sleeping...~&")
|
||||
(thread-sleep! time)
|
||||
(format #t "Awake!~&"))
|
||||
(format #t "You must enter a number~&")))
|
||||
Loading…
Add table
Add a link
Reference in a new issue