Created
August 19, 2020 13:04
-
-
Save katsaii/9921e166fc8121b3b9e42b6fabde5a77 to your computer and use it in GitHub Desktop.
Defer execution of a block until another block is complete.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Deferred Exeuction of Code | |
* -------------------------- | |
* Kat @Katsaii | |
*/ | |
#macro DEFER for (;; { | |
#macro UNTIL ; break; }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works similar to
defer
in languages such as Go or Zig. Execution of the block between the macrosDEFER
andUNTIL
is deferred until the execution of the block afterUNTIL
.Destroying a list after three elements are added
Closing a text file after its content is read