;; `slurp` is polymorphic and supports many types. Sometimes you
;; need to `slurp` a generic argument that could be already a string
;; (perhaps it was loaded somewhere else). Use `char-array` to convert
;; the string into a format suitable for `slurp`:
(defn fetch [x]
(slurp (if (string? x) (char-array x) x)))
(take 10 (fetch "https://clojure.org"))
;;(\h \t \t \p \: \/ \/ \c \l \o)
(take 10 (fetch "Also loading from a string"))
;; (\A \l \s \o \space \l \o \a \d \i)