回答編集履歴
1
fix constructor
answer
CHANGED
@@ -45,7 +45,7 @@
|
|
45
45
|
`newtype` を用いて、`Type -> Type`の形にできます。
|
46
46
|
|
47
47
|
```haskell
|
48
|
-
newtype State s x = { runState :: s -> (x, s) }
|
48
|
+
newtype State s x = State { runState :: s -> (x, s) }
|
49
49
|
|
50
50
|
State s x :: Type
|
51
51
|
State s :: Type -> Type
|