diff options
| author | Shinya Sato <shinnya.sato@gmail.com> | 2022-09-17 22:25:50 +0900 |
|---|---|---|
| committer | Shinya Sato <shinnya.sato@gmail.com> | 2022-09-17 22:25:50 +0900 |
| commit | d90c10cd95e399dd7614df76ee06acd1bf721833 (patch) | |
| tree | 42fd557836de39d4a32a303c40f42393906a6e4c /comparison/Inpla/src/msort-800000-reuse.in | |
| parent | 4b0da2732d7adcaa7d85db2ee329f8a52ef88c42 (diff) | |
| parent | b10fccefe9a6435328ff9d554995fb5710f74f26 (diff) | |
| download | inpla-d90c10cd95e399dd7614df76ee06acd1bf721833.tar.gz inpla-d90c10cd95e399dd7614df76ee06acd1bf721833.zip | |
Merge branch 'develop'
Diffstat (limited to 'comparison/Inpla/src/msort-800000-reuse.in')
| -rw-r--r-- | comparison/Inpla/src/msort-800000-reuse.in | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/comparison/Inpla/src/msort-800000-reuse.in b/comparison/Inpla/src/msort-800000-reuse.in index 4572623..f50f359 100644 --- a/comparison/Inpla/src/msort-800000-reuse.in +++ b/comparison/Inpla/src/msort-800000-reuse.in @@ -4,7 +4,7 @@ msort(ret) >< x:xs => (*L)msort_tail(ret, x)~xs; msort_tail(ret, int n) >< [] => ret~[n]; msort_tail(ret, int n) >< x:xs => - split(left,right) ~ (*R)(n:x:xs), + split(left,right) ~ n:(*R)(x:xs), msort(a)~left, msort(b)~right, (*L)merge(ret,b)~a; merge(ret, snd) >< [] => ret~snd; @@ -15,7 +15,6 @@ mergeCC(ret, int y, ys) >< (int x):xs | x <= y => ret~(x:cnt), (*L)mergeCC(cnt, y, ys) ~ xs | _ => ret~(y:cnt), (*L)mergeCC(cnt, x, xs) ~ ys; - split(right,left) >< [] => right~[], left~[]; split(right,left) >< x:xs => right~(*R)(x:cntl), left~cntr, (*L)split(cntr,cntl)~xs; @@ -29,7 +28,7 @@ make_RandList(ret) >< (int n) // validation checks -valid(ret) >< [] => ret~False; +valid(ret) >< [] => ret~True; valid(ret) >< x:xs => (*L)valid_Cons(ret,x)~xs; valid_Cons(ret, int x) >< [] => ret~True; |
