1
0
mirror of https://github.com/janet-lang/janet synced 2025-09-02 02:48:05 +00:00

Allow iterating over generators with pairs, keys, and values.

This commit is contained in:
Calvin Rose
2023-08-22 19:24:44 -05:00
parent 70a467d469
commit d9605c2856
3 changed files with 12 additions and 6 deletions

View File

@@ -1,10 +1,11 @@
(defn action []
(print "Handled SIGHUP!")
(flush))
(print "cleanup")
(os/exit 1))
(defn main [_]
# Set the interrupt-interpreter argument to `true` to allow
# interrupting the busy loop `(forever)`. By default, will not
# interrupt the interpreter.
(os/sigaction :hup action true)
(os/sigaction :term action true)
(os/sigaction :int action true)
(forever))