Skip to content

Commit

Permalink
Merge pull request #22 from pippolo84/fix-other-typo
Browse files Browse the repository at this point in the history
Fix other typos in multiple generic types section
  • Loading branch information
akutz authored May 11, 2022
2 parents cb1257c + 98b3fa4 commit 2688bc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 03-getting-started/09-multiple-generic-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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) {}
Expand Down

0 comments on commit 2688bc6

Please sign in to comment.