From 4d0e5d3baae763f96046c2d7ad5b8a6d4658c165 Mon Sep 17 00:00:00 2001 From: Genghis Yang Date: Sat, 26 Jun 2021 21:18:08 +0800 Subject: [PATCH 1/2] Fix a typo in scala 3 book domain modeling fp Just a typo --- _overviews/scala3-book/domain-modeling-fp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_overviews/scala3-book/domain-modeling-fp.md b/_overviews/scala3-book/domain-modeling-fp.md index dec7dda6d2..9d1c163864 100644 --- a/_overviews/scala3-book/domain-modeling-fp.md +++ b/_overviews/scala3-book/domain-modeling-fp.md @@ -259,7 +259,7 @@ Pizza.price(pizza1) Grouping functionality this way has a few advantages: - It associates functionality with data and makes it easier to find for programmers (and the compiler). -- It creates a namespace and for instance let's us use `price` as a method name without having to rely on overloading. +- It creates a namespace and for instance let's use `price` as a method name without having to rely on overloading. - The implementation of `Topping.price` can access enumeration values like `Cheese` without having to import them. However, there are also a few tradeoffs that should be considered: From 824a0ab96c40c373fa2b4372098cfe079c696e0b Mon Sep 17 00:00:00 2001 From: Genghis Yang Date: Mon, 28 Jun 2021 16:13:54 +0800 Subject: [PATCH 2/2] Fix typo --- _overviews/scala3-book/domain-modeling-fp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_overviews/scala3-book/domain-modeling-fp.md b/_overviews/scala3-book/domain-modeling-fp.md index 9d1c163864..31e5d19008 100644 --- a/_overviews/scala3-book/domain-modeling-fp.md +++ b/_overviews/scala3-book/domain-modeling-fp.md @@ -259,7 +259,7 @@ Pizza.price(pizza1) Grouping functionality this way has a few advantages: - It associates functionality with data and makes it easier to find for programmers (and the compiler). -- It creates a namespace and for instance let's use `price` as a method name without having to rely on overloading. +- It creates a namespace and for instance lets us use `price` as a method name without having to rely on overloading. - The implementation of `Topping.price` can access enumeration values like `Cheese` without having to import them. However, there are also a few tradeoffs that should be considered: