diff options
| author | Shinya Sato <shinnya.sato@gmail.com> | 2022-09-17 22:25:32 +0900 |
|---|---|---|
| committer | Shinya Sato <shinnya.sato@gmail.com> | 2022-09-17 22:25:32 +0900 |
| commit | b10fccefe9a6435328ff9d554995fb5710f74f26 (patch) | |
| tree | 42fd557836de39d4a32a303c40f42393906a6e4c /comparison/Inpla/src/qsort-260000-reuse.in | |
| parent | 6077933906dd637af93adb3714b476ccba724be1 (diff) | |
| download | inpla-b10fccefe9a6435328ff9d554995fb5710f74f26.tar.gz inpla-b10fccefe9a6435328ff9d554995fb5710f74f26.zip | |
v0.10.0
Diffstat (limited to 'comparison/Inpla/src/qsort-260000-reuse.in')
| -rw-r--r-- | comparison/Inpla/src/qsort-260000-reuse.in | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/comparison/Inpla/src/qsort-260000-reuse.in b/comparison/Inpla/src/qsort-260000-reuse.in index b44e958..33cd7dc 100644 --- a/comparison/Inpla/src/qsort-260000-reuse.in +++ b/comparison/Inpla/src/qsort-260000-reuse.in @@ -5,6 +5,7 @@ qsort(ret) >< (int x):xs => (*L)qsort(cntl)~left, qsort(cntr)~right, Append(ret, x:cntl)~cntr; + // Note: `Append' is implemented as built-in. @@ -12,6 +13,10 @@ part(int x, a, b) >< [] => a~(*L)[], b~(*R)[]; part(int x, a, b) >< (int y):ys | y<x => b~(*R)(y:cnt), (*L)part(x, a, cnt)~ys | _ => a~(*R)(y:cnt), (*L)part(x, cnt, b)~ys; +//| y<x => (*L)part(x, a, cnt)~ys, b~(*R)(y:cnt) // quite BAD! +//| _ => (*L)part(x, cnt, b)~ys, a~(*R)(y:cnt); // quite BAD! + + // creates a random list |
