Skip to content

Commit dd9128f

Browse files
committed
Ch6 - elaborate Action rules
1 parent 56db612 commit dd9128f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

text/chapter6.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,12 +624,12 @@ Another reason to define a superclass relationship is in the case where there is
624624
act :: m -> a -> a
625625
```
626626

627-
An _action_ is a function which describes how monoidal values can be used to modify a value of another type. There are two laws for the `Action` type class:
627+
An _action_ is a function which describes how monoidal values are used to determine how to modify a value of another type. There are two laws for the `Action` type class:
628628

629629
- `act mempty a = a`
630630
- `act (m1 <> m2) a = act m1 (act m2 a)`
631631

632-
That is, the action respects the operations defined by the `Monoid` class.
632+
Applying an empty action is a no-op. And applying two actions in sequence is the same as applying the actions combined. That is, actions respect the operations defined by the `Monoid` class.
633633

634634
For example, the natural numbers form a monoid under multiplication:
635635

0 commit comments

Comments
 (0)