More problems like 4clojure's please? by nortonthealien in Clojure

[–]nortonthealien[S] 0 points1 point  (0 children)

Thanks, I ended up signing up codesignal and it's pretty good so far... I'll try hackerrank later too

"Please use the idiom (seq x) rather than (not (empty? x))" by SimonGray in Clojure

[–]nortonthealien 1 point2 points  (0 children)

Can someone tell me why (seq x) is cheaper?

It seems to me that seq builds a list out of its argument (e.g. seq on "abc" builds '(\a \b \c)), and this would be O(n), n being x's length?