Dropped underscore functions in favour of UFCS

This commit is contained in:
2023-02-14 08:37:31 +00:00
parent eae96d6403
commit 0737b2a483
11 changed files with 148 additions and 166 deletions

View File

@@ -1,10 +1,10 @@
//test function chaining with the dot operator
fn _identity(self) {
fn identity(self) {
return self;
}
fn _check(self) {
fn check(self) {
assert self == 42, "dot chaining failed";
return self;
}
@@ -20,7 +20,7 @@ val
//test the value is actually altered
fn _increment(self) {
fn increment(self) {
return self + 1;
}