]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/unix/linux/proc/proc.factor
Rename and add sorting words
[factor.git] / basis / unix / linux / proc / proc.factor
index 576ce1c1640eb7ecd7528d11d4e2a6fc427ebcb1..dc7512d9f63655d49042216778beea6497e55674 100644 (file)
@@ -2,8 +2,8 @@
 ! See https://factorcode.org/license.txt for BSD license.
 USING: accessors arrays combinators combinators.smart
 io.encodings.utf8 io.files kernel math math.order math.parser
-memoize sequences sorting.slots splitting splitting.monotonic
-strings io.pathnames calendar words ;
+memoize sequences sorting.specification splitting
+splitting.monotonic strings io.pathnames calendar words ;
 IN: unix.linux.proc
 
 ! /proc/*
@@ -110,7 +110,7 @@ ERROR: unknown-cpuinfo-line string ;
     { "" } split harvest [ lines>processor-info ] map ;
 
 : sort-cpus ( seq -- seq )
-    { { physical-id>> <=> } { core-id>> <=> } } sort-by
+    { { physical-id>> <=> } { core-id>> <=> } } sort-with-spec
     [ [ physical-id>> ] bi@ = ] monotonic-split
     [ [ [ core-id>> ] bi@ = ] monotonic-split ] map ;