You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unexpected output of the following function in the labs/looping page in the clojure labs web application
(defn min-1
[x & more](loop [min x
more %28seq more%29]
%28if-let [x %28first more%29]
%28recur %28if %28< x min%29 x min%29 %28next more%29%29
min%29))
I would expect it to return the minimum value of the vector, but it returns the whole vector.
I am a total beginner with clojure so I apologize for any stupid comment. But if this code really does not work maybe it is good to fix it, because many people might be trying to learn clojure with the labrepl clojure labs.
Thank you!
The text was updated successfully, but these errors were encountered:
Unexpected output of the following function in the labs/looping page in the clojure labs web application
(defn min-1
[x & more](loop [min x
more %28seq more%29]
%28if-let [x %28first more%29]
%28recur %28if %28< x min%29 x min%29 %28next more%29%29
min%29))
I would expect it to return the minimum value of the vector, but it returns the whole vector.
I am a total beginner with clojure so I apologize for any stupid comment. But if this code really does not work maybe it is good to fix it, because many people might be trying to learn clojure with the labrepl clojure labs.
Thank you!
The text was updated successfully, but these errors were encountered: