diff options
Diffstat (limited to 'examples/callback.fwd')
-rw-r--r-- | examples/callback.fwd | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/callback.fwd b/examples/callback.fwd new file mode 100644 index 0000000..f750b8b --- /dev/null +++ b/examples/callback.fwd @@ -0,0 +1,16 @@ +fwd_println(auto s); + +callee() +{ + fwd_println("Hello from callback!"); +} + +caller(*() callback) +{ + callback(); +} + +main() +{ + caller(callee); +} |