RosettaCodeData/Task/Strip-comments-from-a-string/Clojure/strip-comments-from-a-string.clj

3 lines
76 B
Clojure
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
> (apply str (take-while #(not (#{\# \;} %)) "apples # comment"))
"apples "