You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_Hint_:SearchPursuit for a helper-function with the signature [`String->Int->String`](https://pursuit.purescript.org/search?q=String%20-%3E%20Int%20-%3E%20String).Note that `String` might appear as a more generic type (such as `Monoid`).
670
678
671
679
Does this instance satisfy the laws listed above?
680
+
672
681
1. (Medium) Write an instance `Action m a =>Action m (Array a)`, where the action on arrays is defined by acting on each array element independently.
682
+
673
683
1. (Difficult) Given the following newtype, write an instance for `Action m (Self m)`, where the monoid `m` acts on itself using `append`:
674
684
675
685
```haskell
676
686
newtypeSelfm=Selfm
677
687
```
688
+
689
+
_Note_:Thetestingframeworkrequires `Show` and `Eq` instancesforthe `Self` and `Multiply` types.Youmayeitherwritetheseinstancesmanually, orletthecompilerhandlethisforyouwith [`derivenewtypeinstance`](https://github.com/purescript/documentation/blob/master/language/Type-Classes.md#derive-from-newtype) shorthand.
0 commit comments