Skip to content

Commit

Permalink
Edit arg names in (fetch) and (display)
Browse files Browse the repository at this point in the history
  • Loading branch information
hisaitami committed Nov 5, 2023
1 parent a295235 commit f639d86
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tldr.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,17 @@
(parse #"(?m)^`(.+)`$" (ansi-str :red " $1" :reset))
(parse #"\{\{(.+?)\}\}" (ansi-str :reset :blue "$1" :red)))))

(defn fetch [cache]
(if (io/exists? cache) (slurp cache)
(defn fetch [file]
(if (io/exists? file) (slurp file)
(die "This page doesn't exist yet!")))

(defn display
([page]
([file]
(println)
(println (format (fetch page))))
(println (format (fetch file))))
([platform page]
(let [cache (first (lookup platform page))]
(display cache))))
(let [file (first (lookup platform page))]
(display file))))

(defn rand-page [platform]
(let [path (cache-path platform)]
Expand Down

0 comments on commit f639d86

Please sign in to comment.