JanetDocsPlaygroundI'm feeling luckyGitHub sign in

prompt



    macro
    boot.janet on line 347, column 1

    (prompt tag & body)

    Set up a checkpoint that can be returned to. `tag` should be a 
    value that is used in a `return` statement, like a keyword.


See also:return1 exampleSign in to add an example
Loading...
(print
  (prompt :a 
          (for i 0 1000000000000 
            (print (string "i=" i))
            (if (= i 2) 
                (return :a 10)))))
# output:
# i=0
# i=1
# i=2
# 10
felixrPlayground