Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There's more sugar #537

Merged
merged 4 commits into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/expressions/sugar.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,9 @@ foo3(37, "Hello", 3.5 where a = 2, b = 3) = x
```

__Does it matter where `value` appears in my parameter list?__ Whilst it doesn't strictly matter it is good practice to put `value` as the last parameter. That way all of the others can be specified by position.

## See also

* [Lambdas](/expressions/object-literals.md#lambdas) (_Sugar for an object with an `apply()` method_)
* [Capability constraints](/generics/generic-constraints.md) (_Sugar for [reference capability](/reference-capabilities/index.md) combinations in the context of generic types_)
* [Default reference capabilities](/generics/generics-and-reference-capabilities.md) (_Sugar for implicit default values in the context of generic types_)
Loading