Closed primo-ppcg closed 1 year ago
The associated tests seem to work here (Linux) :+1:
I guess until https://github.com/janet-lang/spork/pull/148 is merged we will be seeing an unrelated failure during testing.
A side note: the parameter order for merge-sorted-by
is consistent with insert-sorted-by
. However, both are inconsistent with the core function sorted-by
(or every -by
function for that matter, the first parameter is always f
).
It's probably better for parameter order to be consistent within a module, but perhaps both should be updated.
Related: #147
Adds
misc/merge-sorted
andmisc/merge-sorted-by
to merge two arrays which are known to be in sorted order.This is more convenient, and also faster than either:
sort
to the resultmisc/insert-sorted