From b80015bc4d7d30fd6def5d0a2242fafd1989f84a Mon Sep 17 00:00:00 2001 From: hellerve Date: Wed, 12 Feb 2020 11:42:14 +0100 Subject: [PATCH] update for new carp --- path.carp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/path.carp b/path.carp index 68f8be6..d4211d2 100644 --- a/path.carp +++ b/path.carp @@ -85,7 +85,7 @@ It will return `Nothing` if an empty string is passed.") (doc basename "gets the basename of the path `p`.") (defn basename [p] (let [split (split p) - but-last (Array.prefix-array &split (dec (Array.length &split)))] + but-last (Array.prefix &split (dec (Array.length &split)))] (String.join sep-string &but-last))) (doc split-extension "splits the path `p` on its extension. @@ -113,7 +113,7 @@ Examples on POSIX: (let [i (Pattern.find extension-pat p)] (if (= -1 i) (Maybe.Nothing) - (Maybe.Just (Pair.init (prefix-string p i) (suffix-string p (inc i))))))) + (Maybe.Just (Pair.init (prefix p i) (suffix p (inc i))))))) (doc extension "gets the extension of a file as a `Maybe`.") (defn extension [p]