aboutsummaryrefslogtreecommitdiff
path: root/comparison/Inpla/src/msort-800000-reuse.in
diff options
context:
space:
mode:
authorShinya Sato <shinnya.sato@gmail.com>2022-09-17 22:25:32 +0900
committerShinya Sato <shinnya.sato@gmail.com>2022-09-17 22:25:32 +0900
commitb10fccefe9a6435328ff9d554995fb5710f74f26 (patch)
tree42fd557836de39d4a32a303c40f42393906a6e4c /comparison/Inpla/src/msort-800000-reuse.in
parent6077933906dd637af93adb3714b476ccba724be1 (diff)
downloadinpla-b10fccefe9a6435328ff9d554995fb5710f74f26.tar.gz
inpla-b10fccefe9a6435328ff9d554995fb5710f74f26.zip
v0.10.0
Diffstat (limited to 'comparison/Inpla/src/msort-800000-reuse.in')
-rw-r--r--comparison/Inpla/src/msort-800000-reuse.in5
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;