Anonymous user
Check that file exists: Difference between revisions
updated Clojure version
m (→{{header|JScript}}: change to JavaScript, works with JScript) |
(updated Clojure version) |
||
Line 217:
=={{header|Clojure}}==
<lang clojure>
(defn kind [filename]
(let [f (File. filename)]
(cond
:else "(non-existent)" )))
(defn look-for [filename]
(println filename ":" (kind filename)))
(look-for "file.txt")
(look-for "/file.txt")
(look-for "docs")
(look-for "/docs")
</lang>
=={{header|Common Lisp}}==
|