Created
November 3, 2018 10:24
-
-
Save handicraftsman/169e2b2d7016d12c308e64560729825e to your computer and use it in GitHub Desktop.
For loop
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
// same code as in quill part, but in C++ | |
{ | |
int i = 0 | |
contfunc = [&] () { i++; } | |
while (i < 10) { | |
std::cout << i << std::endl; | |
contfunc(); | |
} | |
std::cout << "Done counting" << std::endl; | |
} |
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
; for is a macro which must be imported | |
; Code below expands into something like code in cpp part, but in quill | |
(for (setv i:Int32 0) | |
while (< i 10) | |
step (set i (+ i 1)) | |
do | |
(println (.toString i)) | |
after | |
(println "Done counting")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
quill_continue_func
will be called after each iteration