From 2c5cd95422e9e89c2d11ec0f4cce3c7018030ddd Mon Sep 17 00:00:00 2001 From: Fabio Falzoi Date: Fri, 6 May 2022 23:21:53 +0200 Subject: [PATCH 1/2] Fix typo --- 03-getting-started/09-multiple-generic-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/03-getting-started/09-multiple-generic-types.md b/03-getting-started/09-multiple-generic-types.md index bf5542d..5e4deb8 100644 --- a/03-getting-started/09-multiple-generic-types.md +++ b/03-getting-started/09-multiple-generic-types.md @@ -34,7 +34,7 @@ func SomeFunc[T ~string, K Numeric](id T, fn SumFn[K]) {} > receive zero to many numeric values -Okay, this would be a variadic based on the generic constriant `Numeric`. Easy enough: +Okay, this would be a variadic based on the generic constraint `Numeric`. Easy enough: ```golang func SomeFunc[T ~string, K Numeric](id T, sum SumFn[K], values ...K) {} From 98b3fa45a32ccc5ab0ed28974be313c8ac8fe3fd Mon Sep 17 00:00:00 2001 From: Fabio Falzoi Date: Fri, 6 May 2022 23:22:09 +0200 Subject: [PATCH 2/2] Remove trailing whitespace --- 03-getting-started/09-multiple-generic-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/03-getting-started/09-multiple-generic-types.md b/03-getting-started/09-multiple-generic-types.md index 5e4deb8..26fa342 100644 --- a/03-getting-started/09-multiple-generic-types.md +++ b/03-getting-started/09-multiple-generic-types.md @@ -13,7 +13,7 @@ With what we have learned so far, it _should_ be possible to satisfy the above u So there needs to be a single function that can handle the remaining requirements, got it. -> receive an ID that can be represented by a string value +> receive an ID that can be represented by a string value This sounds like a generic constraint that can be expressed as `~string`. With that we can probably start building our function: