Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
include "std.lobster"
|
||||
|
||||
def quicksort(xs, lt):
|
||||
if xs.length <= 1:
|
||||
xs
|
||||
else:
|
||||
pivot := xs[0]
|
||||
tail := xs.slice(1, -1)
|
||||
f1 := filter tail: lt(_, pivot)
|
||||
f2 := filter tail: !lt(_, pivot)
|
||||
append(append(quicksort(f1, lt), [ pivot ]),
|
||||
quicksort(f2, lt))
|
||||
|
||||
sorted := [ 3, 9, 5, 4, 1, 3, 9, 5, 4, 1 ].quicksort(): _a < _b
|
||||
print sorted
|
||||
Loading…
Add table
Add a link
Reference in a new issue