diff options
| author | Shinya Sato <shinnya.sato@gmail.com> | 2022-04-27 16:58:17 +0900 |
|---|---|---|
| committer | Shinya Sato <shinnya.sato@gmail.com> | 2022-04-27 16:58:17 +0900 |
| commit | 2de302bcb3fa7e12c83a58909232a527c4d5372e (patch) | |
| tree | c71e5f12b2733bb0e3ef65734e6ff5a685a1c989 | |
| parent | 7eb8215df157a5ff32ccc0376ac2efc6276fc2bc (diff) | |
| download | inpla-2de302bcb3fa7e12c83a58909232a527c4d5372e.tar.gz inpla-2de302bcb3fa7e12c83a58909232a527c4d5372e.zip | |
Remove redundant letters
| -rw-r--r-- | comparison/Haskell/ack3-11.hs | 3 | ||||
| -rw-r--r-- | comparison/Haskell/bsort-40000.hs | 2 | ||||
| -rw-r--r-- | comparison/Haskell/fib38.hs | 3 | ||||
| -rw-r--r-- | comparison/Haskell/isort-40000.hs | 7 | ||||
| -rw-r--r-- | comparison/Haskell/qsort-800000.hs | 4 | ||||
| -rw-r--r-- | comparison/Inpla/src/bsort-40000-reuse.in | 1 | ||||
| -rw-r--r-- | comparison/Inpla/src/bsort-40000.in | 1 | ||||
| -rw-r--r-- | comparison/Inpla/src/fib-38-reuse.in | 7 | ||||
| -rw-r--r-- | comparison/Inpla/src/fib-38.in | 7 | ||||
| -rw-r--r-- | comparison/Inpla/src/isort-40000-reuse.in | 2 | ||||
| -rw-r--r-- | comparison/Inpla/src/isort-40000.in | 2 | ||||
| -rw-r--r-- | comparison/Inpla/src/qsort-800000-reuse.in | 3 | ||||
| -rw-r--r-- | comparison/Inpla/src/qsort-800000.in | 3 | ||||
| -rw-r--r-- | comparison/Python/isort-40000.py | 2 | ||||
| -rw-r--r-- | comparison/Python/msort-800000.py | 1 | ||||
| -rw-r--r-- | comparison/Python/qsort-800000.py | 3 | ||||
| -rw-r--r-- | comparison/SML/ack3-11.sml | 1 | ||||
| -rw-r--r-- | comparison/SML/bsort-40000.sml | 2 | ||||
| -rw-r--r-- | comparison/SML/isort-40000.sml | 1 | ||||
| -rw-r--r-- | comparison/SML/msort-800000.sml | 3 | ||||
| -rw-r--r-- | src/.#-emacsI0w9oW | 1 |
21 files changed, 3 insertions, 56 deletions
diff --git a/comparison/Haskell/ack3-11.hs b/comparison/Haskell/ack3-11.hs index 7c8f350..45b2853 100644 --- a/comparison/Haskell/ack3-11.hs +++ b/comparison/Haskell/ack3-11.hs @@ -4,6 +4,3 @@ ack m n = ack (m-1) (ack m (n-1)) main = print $ (ack 3 11) - - - diff --git a/comparison/Haskell/bsort-40000.hs b/comparison/Haskell/bsort-40000.hs index 1940917..401ceaf 100644 --- a/comparison/Haskell/bsort-40000.hs +++ b/comparison/Haskell/bsort-40000.hs @@ -22,7 +22,6 @@ main = print $ bsort [3,2,8,5] -} - randomList :: Int -> IO([Int]) randomList 0 = return [] randomList n = do @@ -31,7 +30,6 @@ randomList n = do return (r:rs) - main = do list <- randomList 40000 let sorted = bsort list diff --git a/comparison/Haskell/fib38.hs b/comparison/Haskell/fib38.hs index 96040eb..658d228 100644 --- a/comparison/Haskell/fib38.hs +++ b/comparison/Haskell/fib38.hs @@ -4,6 +4,3 @@ fib n = fib (n - 2) + fib (n - 1) main = print $ fib 38 - - - diff --git a/comparison/Haskell/isort-40000.hs b/comparison/Haskell/isort-40000.hs index f834d00..1abc148 100644 --- a/comparison/Haskell/isort-40000.hs +++ b/comparison/Haskell/isort-40000.hs @@ -1,5 +1,5 @@ {- -(* http://www.codecodex.com/wiki/Insertion_sort#Standard_ML *) +http://www.codecodex.com/wiki/Insertion_sort#Standard_ML -} import System.Random @@ -25,12 +25,7 @@ randomList n = do return (r:rs) - main = do list <- randomList 40000 let sorted = isort list print (take 10 sorted) - - - - diff --git a/comparison/Haskell/qsort-800000.hs b/comparison/Haskell/qsort-800000.hs index 492efef..2a9d60d 100644 --- a/comparison/Haskell/qsort-800000.hs +++ b/comparison/Haskell/qsort-800000.hs @@ -3,7 +3,6 @@ -} import System.Random - qsort [] = [] qsort [x] = [x] qsort (x:xs) = (qsort left) ++ [x] ++ (qsort right) @@ -16,7 +15,6 @@ part pivot (x:xs) where (below, above) = part pivot xs - {- main = print $ qsort [3,2,8,5] -} @@ -29,9 +27,7 @@ randomList n = do return (r:rs) - main = do list <- randomList 800000 let sorted = qsort list print (take 10 sorted) - diff --git a/comparison/Inpla/src/bsort-40000-reuse.in b/comparison/Inpla/src/bsort-40000-reuse.in index 8b6a386..3abd0ec 100644 --- a/comparison/Inpla/src/bsort-40000-reuse.in +++ b/comparison/Inpla/src/bsort-40000-reuse.in @@ -11,7 +11,6 @@ B(ret, int x) >< (int y):ys - const LIST_ELEM=40000; MkRandList(ret) >< (int n) diff --git a/comparison/Inpla/src/bsort-40000.in b/comparison/Inpla/src/bsort-40000.in index 0120900..d0a5e1c 100644 --- a/comparison/Inpla/src/bsort-40000.in +++ b/comparison/Inpla/src/bsort-40000.in @@ -11,7 +11,6 @@ B(ret, int x) >< (int y):ys - const LIST_ELEM=40000; MkRandList(ret) >< (int n) diff --git a/comparison/Inpla/src/fib-38-reuse.in b/comparison/Inpla/src/fib-38-reuse.in index 6b3d32b..e56fabd 100644 --- a/comparison/Inpla/src/fib-38-reuse.in +++ b/comparison/Inpla/src/fib-38-reuse.in @@ -4,13 +4,6 @@ Fib(r) >< (int n) | n == 1 => r~1 | _ => Fib(cnt1)~(n-1), Fib(cnt2)~(n-2), (*L)Add(r,cnt2)~cnt1; -/* Add is realised as built-in. -Addd(r,n) >< (int m) -=> Addd2(r,m) ~ n; - -Addd2(r,int m) >< (int n) -=> r~(m+n); -*/ Fib(r)~38; r; diff --git a/comparison/Inpla/src/fib-38.in b/comparison/Inpla/src/fib-38.in index a79eb5b..925f5ff 100644 --- a/comparison/Inpla/src/fib-38.in +++ b/comparison/Inpla/src/fib-38.in @@ -4,13 +4,6 @@ Fib(r) >< (int n) | n == 1 => r~1 | _ => Add(r,cnt2)~cnt1, Fib(cnt1)~(n-1), Fib(cnt2)~(n-2); -/* -Addd(r,n) >< (int m) -=> Addd2(r,m) ~ n; - -Addd2(r,int m) >< (int n) -=> r~(m+n); -*/ Fib(r)~38; r; diff --git a/comparison/Inpla/src/isort-40000-reuse.in b/comparison/Inpla/src/isort-40000-reuse.in index 00f0ecc..3e7e2d2 100644 --- a/comparison/Inpla/src/isort-40000-reuse.in +++ b/comparison/Inpla/src/isort-40000-reuse.in @@ -18,5 +18,3 @@ MkRandList(ret) >< (int n) MkRandList(cnt)~(LIST_ELEM), IS(ret)~cnt; ret; - - diff --git a/comparison/Inpla/src/isort-40000.in b/comparison/Inpla/src/isort-40000.in index ff831a3..295f6f4 100644 --- a/comparison/Inpla/src/isort-40000.in +++ b/comparison/Inpla/src/isort-40000.in @@ -18,5 +18,3 @@ MkRandList(ret) >< (int n) MkRandList(cnt)~(LIST_ELEM), IS(ret)~cnt; ret; - - diff --git a/comparison/Inpla/src/qsort-800000-reuse.in b/comparison/Inpla/src/qsort-800000-reuse.in index 8bf7a83..810e446 100644 --- a/comparison/Inpla/src/qsort-800000-reuse.in +++ b/comparison/Inpla/src/qsort-800000-reuse.in @@ -7,9 +7,6 @@ QS(ret) >< (int x):xs => // Note: `Append' is implemented as built-in. -// Apnd(ret, a)~b --> ret ~ b@a -//Apnd(ret, a) >< [] => ret~a; -//Apnd(ret, a) >< x:xs => ret~(x:cnt), Apnd(cnt, a)~xs; Part(int x, a, b) >< [] => a~(*L)[], b~(*R)[]; Part(int x, a, b) >< (int y):ys diff --git a/comparison/Inpla/src/qsort-800000.in b/comparison/Inpla/src/qsort-800000.in index e8913e8..8226655 100644 --- a/comparison/Inpla/src/qsort-800000.in +++ b/comparison/Inpla/src/qsort-800000.in @@ -7,9 +7,6 @@ QS(ret) >< (int x):xs => // Note: `Append' is implemented as built-in. -// Apnd(ret, a)~b --> ret ~ b@a -//Apnd(ret, a) >< [] => ret~a; -//Apnd(ret, a) >< x:xs => ret~(x:cnt), Apnd(cnt, a)~xs; Part(int x, a, b) >< [] => a~[], b~[]; Part(int x, a, b) >< (int y):ys diff --git a/comparison/Python/isort-40000.py b/comparison/Python/isort-40000.py index 6fbadb7..0bfc577 100644 --- a/comparison/Python/isort-40000.py +++ b/comparison/Python/isort-40000.py @@ -20,5 +20,3 @@ def mkRandList(n): a = mkRandList(40000) insert_sort(a) #print(a) - - diff --git a/comparison/Python/msort-800000.py b/comparison/Python/msort-800000.py index f8b8bd1..fcb89e1 100644 --- a/comparison/Python/msort-800000.py +++ b/comparison/Python/msort-800000.py @@ -51,6 +51,5 @@ def mkRandList ( n ): return a a = mkRandList(800000) -#a = mkRandList(8) mergeSort(a) #print(a) diff --git a/comparison/Python/qsort-800000.py b/comparison/Python/qsort-800000.py index 9a75977..b58bf1c 100644 --- a/comparison/Python/qsort-800000.py +++ b/comparison/Python/qsort-800000.py @@ -29,6 +29,5 @@ def mkRandList ( n ): return a a = mkRandList(800000) -#a = mkRandList(8) b = quickSort(a) -#print(a) +#print(b) diff --git a/comparison/SML/ack3-11.sml b/comparison/SML/ack3-11.sml index f1ea7f2..4668ddb 100644 --- a/comparison/SML/ack3-11.sml +++ b/comparison/SML/ack3-11.sml @@ -2,5 +2,4 @@ fun ack 0 n = n+1 | ack m 0 = ack (m-1) 1 | ack m n = ack (m-1) (ack m (n-1)); - ack 3 11; diff --git a/comparison/SML/bsort-40000.sml b/comparison/SML/bsort-40000.sml index 48c3eb4..e892f09 100644 --- a/comparison/SML/bsort-40000.sml +++ b/comparison/SML/bsort-40000.sml @@ -26,5 +26,3 @@ end; bsort (mkRandList 40000); - - diff --git a/comparison/SML/isort-40000.sml b/comparison/SML/isort-40000.sml index 973d6e6..a851dbd 100644 --- a/comparison/SML/isort-40000.sml +++ b/comparison/SML/isort-40000.sml @@ -8,7 +8,6 @@ fun insertsort [] = [] in insert(x, insertsort xs) end; - (* mkRandList *) local val nextInt = Random.randRange(1,10000); diff --git a/comparison/SML/msort-800000.sml b/comparison/SML/msort-800000.sml index 2a33649..9209685 100644 --- a/comparison/SML/msort-800000.sml +++ b/comparison/SML/msort-800000.sml @@ -28,8 +28,6 @@ fun msort [] = [] end; - - (* mkRandList *) local val nextInt = Random.randRange(1,10000); @@ -42,4 +40,3 @@ end; msort (mkRandList 800000); - diff --git a/src/.#-emacsI0w9oW b/src/.#-emacsI0w9oW new file mode 100644 index 0000000..3ad3e07 --- /dev/null +++ b/src/.#-emacsI0w9oW @@ -0,0 +1 @@ +shinya@DESKTOP-O24CQQG.11248:1646292363
\ No newline at end of file |
