From d998cc53f79ac351aa20e81e6e01f34b825d25ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4drich?= <11225821+shaedrich@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:39:08 +0100 Subject: [PATCH 1/4] There's more sugar Fix #535 --- docs/expressions/sugar.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/expressions/sugar.md b/docs/expressions/sugar.md index 3f223c42..dfa463f5 100644 --- a/docs/expressions/sugar.md +++ b/docs/expressions/sugar.md @@ -113,3 +113,8 @@ 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](https://tutorial.ponylang.io/expressions/object-literals#lambdas) (_Shortcut for an object with an `apply()` method_) +* [Capability constraints](https://tutorial.ponylang.io/generics/generic-constraints.html) (_Shortcut for [reference capability](https://tutorial.ponylang.io/reference-capabilities/) combinations_) +* [Default reference capabilities](https://tutorial.ponylang.io/generics/generics-and-reference-capabilities) (_Shortcut for implicit default values_) From 766a02c5795dfd8dd65d9dd52ec7be9dd7b1b309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4drich?= <11225821+shaedrich@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:50:24 +0100 Subject: [PATCH 2/4] Add line break between heading and list Co-authored-by: Sean T Allen --- docs/expressions/sugar.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/expressions/sugar.md b/docs/expressions/sugar.md index dfa463f5..55182404 100644 --- a/docs/expressions/sugar.md +++ b/docs/expressions/sugar.md @@ -115,6 +115,7 @@ 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](https://tutorial.ponylang.io/expressions/object-literals#lambdas) (_Shortcut for an object with an `apply()` method_) * [Capability constraints](https://tutorial.ponylang.io/generics/generic-constraints.html) (_Shortcut for [reference capability](https://tutorial.ponylang.io/reference-capabilities/) combinations_) * [Default reference capabilities](https://tutorial.ponylang.io/generics/generics-and-reference-capabilities) (_Shortcut for implicit default values_) From ba941658ac915f694df58b66b023fef8b7de1b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4drich?= <11225821+shaedrich@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:53:55 +0100 Subject: [PATCH 3/4] Use mkdocs resolution style rather than full HTTP links As requested in https://github.com/ponylang/pony-tutorial/pull/537#issuecomment-2021225045 --- docs/expressions/sugar.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/expressions/sugar.md b/docs/expressions/sugar.md index 55182404..2568dbc4 100644 --- a/docs/expressions/sugar.md +++ b/docs/expressions/sugar.md @@ -116,6 +116,6 @@ __Does it matter where `value` appears in my parameter list?__ Whilst it doesn't ## See also -* [Lambdas](https://tutorial.ponylang.io/expressions/object-literals#lambdas) (_Shortcut for an object with an `apply()` method_) -* [Capability constraints](https://tutorial.ponylang.io/generics/generic-constraints.html) (_Shortcut for [reference capability](https://tutorial.ponylang.io/reference-capabilities/) combinations_) -* [Default reference capabilities](https://tutorial.ponylang.io/generics/generics-and-reference-capabilities) (_Shortcut for implicit default values_) +* [Lambdas](/expressions/object-literals.md#lambdas) (_Shortcut for an object with an `apply()` method_) +* [Capability constraints](/generics/generic-constraints.md) (_Shortcut for [reference capability](/reference-capabilities/index.md) combinations_) +* [Default reference capabilities](/generics/generics-and-reference-capabilities.md) (_Shortcut for implicit default values_) From b0e41b16a5cf3153a16f7e083a733bb53a076ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=A4drich?= <11225821+shaedrich@users.noreply.github.com> Date: Sat, 30 Mar 2024 13:24:24 +0100 Subject: [PATCH 4/4] Consistent wording and clarification of context Co-authored-by: Joe Eli McIlvain --- docs/expressions/sugar.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/expressions/sugar.md b/docs/expressions/sugar.md index 2568dbc4..8213b490 100644 --- a/docs/expressions/sugar.md +++ b/docs/expressions/sugar.md @@ -116,6 +116,6 @@ __Does it matter where `value` appears in my parameter list?__ Whilst it doesn't ## See also -* [Lambdas](/expressions/object-literals.md#lambdas) (_Shortcut for an object with an `apply()` method_) -* [Capability constraints](/generics/generic-constraints.md) (_Shortcut for [reference capability](/reference-capabilities/index.md) combinations_) -* [Default reference capabilities](/generics/generics-and-reference-capabilities.md) (_Shortcut for implicit default values_) +* [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_)