JanetDocsPlaygroundI'm feeling luckyGitHub sign in

forever



    macro
    boot.janet on line 529, column 1

    (forever & body)

    Evaluate body forever in a loop, or until a break statement.


2 examplesSign in to add an example
Loading...
(forever 
 (print "and then?") 
 (ev/sleep 1) 
 (print "no and then!")) 

# => and then? 
# sleeps for one second
# => no and then!
# => and then?
# sleeps for one second
# => no and then!
# ...
jgartePlayground
(forever
  (print (os/time))
  (ev/sleep 1))

# => epoch clocks, prints epoch timestamp every second
pepePlayground