質問編集履歴
3
コードの修正
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -14,17 +14,14 @@
|
|
|
14
14
|
```
|
|
15
15
|
以下、エラー文です。
|
|
16
16
|
```haskell
|
|
17
|
-
|
|
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
|
-
|
|
19
|
+
• In the second argument of ‘(==)’, namely ‘True’
|
|
21
|
-
|
|
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) ==
|
|
23
|
+
odd . length . filter (/= 0) == True
|
|
27
24
|
|
|
|
28
|
-
16 | make9 bits | odd . length . filter(/= 0) ==
|
|
25
|
+
16 | make9 bits | odd . length . filter(/= 0) == True = take 8 (bits ++ repeat 0) ++ [1]
|
|
29
|
-
|
|
|
26
|
+
|
|
|
30
27
|
```
|
2
修正
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 .
|
|
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
タイトルの修正
title
CHANGED
|
@@ -1,1 +1,1 @@
|
|
|
1
|
-
パリティビット付加のプログラム
|
|
1
|
+
パリティビット付加のプログラムのエラー
|
body
CHANGED
|
File without changes
|