Skip to content

Commit

Permalink
There's more sugar (#537)
Browse files Browse the repository at this point in the history
Fix #535
  • Loading branch information
shaedrich authored Apr 2, 2024
1 parent 0356657 commit d8e6cf4
Showing 1 changed file with 6 additions and 0 deletions.
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_)

0 comments on commit d8e6cf4

Please sign in to comment.