3 ms·
From that link: (defn say-hi [text] (while true (if (< (length &text) 10) (println "Too short!") (println &text)))) Surp
by sph 4y ago
From that link:
(defn say-hi [text]
(while true
(if (< (length &text) 10)
(println "Too short!")
(println &text))))
Surprisingly similar to Rust, though I wonder if borrowing-by-default wouldn't be more readable than adding & everywhere. If you really need to give something ownership, you could have a sigil that maps to (move <var>)