Skip to content

Commit 6552e73

Browse files
committed
correct 2&3 and 3 only tab.
1 parent b2045ea commit 6552e73

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

_overviews/scala3-book/domain-modeling-fp.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ In Scala, describing the data model of a programming problem is simple:
5858

5959
Data that simply consists of different alternatives, like crust size, crust type, and toppings, is concisely modeled with the Scala 3 `enum` construct:
6060

61-
{% tabs data_1 class=tabs-scala-version %}
61+
{% tabs data_1 %}
6262
{% tab 'Scala 3 only' for=data_1 %}
6363

6464
```scala
@@ -124,7 +124,7 @@ This solution is very concise because it doesn’t require the operations on a p
124124
The data model is easy to read, like declaring the design for a relational database.
125125
It is also very easy to create values of our data model and inspect them:
126126

127-
{% tabs data_3 class=tabs-scala-version %}
127+
{% tabs data_3 %}
128128
{% tab 'Scala 2 and 3' for=data_3 %}
129129

130130
```scala
@@ -140,7 +140,7 @@ println(myFavPizza.crustType) // prints Regular
140140
We might go on in the same way to model the entire pizza-ordering system.
141141
Here are a few other `case` classes that are used to model such a system:
142142

143-
{% tabs data_4 class=tabs-scala-version %}
143+
{% tabs data_4 %}
144144
{% tab 'Scala 2 and 3' for=data_4 %}
145145

146146
```scala
@@ -324,7 +324,7 @@ A first approach is to define the behavior---the functions---in a companion obje
324324
325325
With this approach, in addition to the enumeration or case class you also define an equally named companion object that contains the behavior.
326326

327-
{% tabs org_1 class=tabs-scala-version %}
327+
{% tabs org_1 %}
328328
{% tab 'Scala 3 only' for=org_1 %}
329329

330330
```scala
@@ -355,7 +355,7 @@ object Topping:
355355

356356
With this approach you can create a `Pizza` and compute its price like this:
357357

358-
{% tabs org_2 class=tabs-scala-version %}
358+
{% tabs org_2 %}
359359
{% tab 'Scala 2 and 3' for=org_2 %}
360360

361361
```scala
@@ -431,7 +431,7 @@ When you write a pure interface like this, you can think of it as a contract tha
431431
What you might also do at this point is imagine that you’re the consumer of this API.
432432
When you do that, it helps to sketch out some sample “consumer” code to make sure the API looks like what you want:
433433

434-
{% tabs module_2 class=tabs-scala-version %}
434+
{% tabs module_2 %}
435435
{% tab 'Scala 2 and 3' for=module_2 %}
436436

437437
```scala
@@ -633,7 +633,7 @@ Instead, they have their own reference to the current pizza instance as `this`.
633633

634634
Now you can use this new design like this:
635635

636-
{% tabs module_6 class=tabs-scala-version %}
636+
{% tabs module_6 %}
637637
{% tab 'Scala 2 and 3' for=module_6 %}
638638

639639
```scala
@@ -659,7 +659,7 @@ This can have multiple advantages:
659659

660660
Let us revisit our example once more.
661661

662-
{% tabs module_7 class=tabs-scala-version %}
662+
{% tabs module_7 %}
663663
{% tab 'Scala 3 only' for=module_7 %}
664664

665665
```scala
@@ -694,7 +694,7 @@ With `extension (p: Pizza)` we say that we want to make the methods available on
694694

695695
This way, we can obtain the same API as before
696696

697-
{% tabs module_8 class=tabs-scala-version %}
697+
{% tabs module_8 %}
698698
{% tab 'Scala 2 and 3' for=module_8 %}
699699

700700
```scala

0 commit comments

Comments
 (0)