teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

fix constructor

2020/08/19 15:07

投稿

YufanLou
YufanLou

スコア466

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