summaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-04 05:17:22 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-04 05:17:22 +0330
commitf570c63542bc644d829aff8c470db2385a3c5180 (patch)
tree2ed885895510eab9bc8845d3e14b5e76c064f845 /code
parent5c0542111e67d60490c7e218b985d6c6b9eaf9f2 (diff)
add reassignable functions in function scopes (reassignable lambdas)
Diffstat (limited to 'code')
-rw-r--r--code/main.felan7
1 files changed, 5 insertions, 2 deletions
diff --git a/code/main.felan b/code/main.felan
index ce11587..e8e3254 100644
--- a/code/main.felan
+++ b/code/main.felan
@@ -7,10 +7,13 @@ double :: f64;
main :: () -> void {
a :u64= 2;
- f :: (c:u64,b:u64)->void{
+ f := (c:u64,b:u64)->void{
print_u64 c-b+a;
};
- foo(f);
+ f = (c:u64,b:u64)->void{
+ print_u64 c*b;
+ };
+ foo(fun = f);
};
foo :: (fun:(b:u64,u64)->void)->void{