JanetDocsPlaygroundI'm feeling luckyGitHub sign in

defer



    macro
    boot.janet on line 305, column 1

    (defer form & body)

    Run form unconditionally after body, even if the body throws an
    error. Will also run form if a user signal 0-4 is received.


1 exampleSign in to add an example
Loading...
(var a false)
(defer (set a 42) 
  (set a true)
  (error "Oh no!"))
# error: Oh no!

(pp a) # => prints 42
pepePlayground