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

質問編集履歴

3

コードの修正

2021/08/26 15:07

投稿

old.exe
old.exe

スコア23

title CHANGED
File without changes
body CHANGED
@@ -14,17 +14,14 @@
14
14
  ```
15
15
  以下、エラー文です。
16
16
  ```haskell
17
- • Couldn't match expected type ‘[a1] -> Bool’
17
+ • Couldn't match expected type ‘[a0] -> Bool’
18
18
  with actual type ‘Bool’
19
- • Possible cause: ‘odd’ is applied to too many arguments
20
- In the second argument of ‘(==)’, namely
19
+ In the second argument of ‘(==)’, namely ‘True’
21
- odd (length . filter (/= 0))’
20
+ In the expression: odd . length . filter (/= 0) == True
22
- In the expression:
23
- odd . length . filter (/= 0) == odd (length . filter (/= 0))
24
21
  In a stmt of a pattern guard for
25
22
  an equation for ‘make9’:
26
- odd . length . filter (/= 0) == odd (length . filter (/= 0))
23
+ odd . length . filter (/= 0) == True
27
24
  |
28
- 16 | make9 bits | odd . length . filter(/= 0) == odd(length.filter(/= 0)) = take 8 (bits ++ repeat 0) ++ [1]
25
+ 16 | make9 bits | odd . length . filter(/= 0) == True = take 8 (bits ++ repeat 0) ++ [1]
29
- |
26
+ |
30
27
  ```

2

修正

2021/08/26 15:07

投稿

old.exe
old.exe

スコア23

title CHANGED
File without changes
body CHANGED
@@ -9,7 +9,7 @@
9
9
  [1,0,1,1,0,0,0,0]
10
10
  ```
11
11
  ```Haskell
12
- make9 bits | odd . length . length . filter(/=0) == True = take8 (bits ++ repeat 0) ++ [1]
12
+ make9 bits | odd . length . filter(/=0) == True = take8 (bits ++ repeat 0) ++ [1]
13
13
  | otherwise = take 8 (bits ++ repeat 0) ++ [0]
14
14
  ```
15
15
  以下、エラー文です。

1

タイトルの修正

2021/08/26 15:05

投稿

old.exe
old.exe

スコア23

title CHANGED
@@ -1,1 +1,1 @@
1
- パリティビット付加のプログラム
1
+ パリティビット付加のプログラムのエラー
body CHANGED
File without changes