fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Fuzion Caveats
•
This-types in lambda and anonymous features
This-types in lambda and anonymous features
You can't refer to the instance of a lambda or an anonymous feature.
Code input
this_types_in_lambda_and_anonymous => # lambdas [1,2].map n-> lambda.this # this not work you have to use longform, see below my_lamda : Unary i32 i32 is n := 2 public redef call(n i32) i32 => my_lamda.this.n say <| [1,2].map my_lamda # anonymous features calc_lazy_broken => _ : Lazy i32 is public redef call i32 => anonymous.this.n # this not work you have to use longform, see below calc_lazy_working => my_lazy : Lazy i32 is n := 3 public redef call i32 => my_lazy.this.n my_lazy
What are effects?
last changed: 2026-04-21