From bfebad7c99077a359024043e54a5dd87895af35f Mon Sep 17 00:00:00 2001 From: Shinya Sato Date: Sun, 24 Oct 2021 23:34:46 +0900 Subject: Update qsort.in --- sample/qsort.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sample/qsort.in') diff --git a/sample/qsort.in b/sample/qsort.in index 1582213..523d7d8 100644 --- a/sample/qsort.in +++ b/sample/qsort.in @@ -7,14 +7,13 @@ qsort(ret) >< (int x):xs => qsort(left)~smaller, qsort(right)~larger; // Note: `Append' is implemented as the following built-in agent: -// Append(ret, b)~a --> ret ~ a@b +// Append(ret, b)~a --> ret ~ (a++b) part(smaller, larger, int x) >< [] => smaller~[], larger~[]; part(smaller, larger, int x) >< (int y):ys | y smaller~(y:cnt), part(cnt, larger, x)~ys | _ => larger~(y:cnt), part(smaller, cnt, x)~ys; - // Nets qsort(ret)~[3,6,1,9,2]; ret; \ No newline at end of file -- cgit v1.2.3