Added mem::safe_recursive_clone, and while it works for regex, it's actually slower then remaking it. Hmmmm, maybe because some of the stdlib is inefficent
This commit is contained in:
12
tests/test_rec_closure.krak
Normal file
12
tests/test_rec_closure.krak
Normal file
@@ -0,0 +1,12 @@
|
||||
import io:*
|
||||
|
||||
fun main():int {
|
||||
var message = "thingy: "
|
||||
var func: fun(int):void = fun(it: int) {
|
||||
print(message); println(it)
|
||||
if (it > 0)
|
||||
func(it-1)
|
||||
}
|
||||
func(4)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user