 
 <PRIVATE
 
-: default-path ( -- path )
-    os {
-        { windows [ ".;C:\\bin" ] }
-        { macosx [ ":" ] }
-        { linux [ ":/bin:/usr/bin" ] }
-    } case ;
-
-: current-path ( -- path )
-    "PATH" os-env [ default-path ] unless* ;
-
-: split-path ( path -- seq )
-    os windows? ";" ":" ? split harvest ;
-
 : executable? ( path -- ? )
     {
         [ exists? ]
         [ file-executable? ]
         [ file-info directory? not ]
     } 1&& ;
+
+: split-path ( paths -- seq )
+    os windows? ";" ":" ? split harvest ;
 
 : path-extensions ( command -- commands )
     "PATHEXT" os-env [

    [ prepend-path ] { } assoc>map
    [ executable? ] find nip ;

: (which) ( command paths -- file/f )
    split-path os windows? [
        [ path-extensions ] [ "." prefix ] bi*
    ] [ [ 1array ] dip ] if ((which)) ;

PRIVATE>

: which ( command -- file/f )
    "PATH" os-env (which) ;
