Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The way that conj behaves differently for lists and vectors is still confusing to me at times, but this is probably the best solution.
Interesting, I didn't know that!
This comment is hidden because it contains spoiler information about the solution
Fair enough. I suppose decades of review have made the Haskell source a bit cleaner.
It always makes me a bit disappointed to review the definition of the
for
macro in the Clojure source :(AFAIK not nessecarily.
The way the clojure language bootstraps itself causes some core functions to be written in a weird reduced subset of the langauage.
Also a lot of the core functions are optimized in nonintuitive ways which might not be idiomatic either.
Besides idiomaticity, I don't think that reimplementing core functions is an easy (8 or 7 Kyu) task in clojure. Some of the design choises of clojure are weird to newcommers (see this super long discussion about the time complexity of last https://groups.google.com/forum/#!topic/clojure/apkNXk08Xes), and the devil is often in the detail when it comes to interactions between high level abstractions (seq) and lowlevel constructs (vectors and maps).
I don't know, I ported this from Haskell, where the "best practices" generally looks identical to the code in
Prelude.hs
.Wouldn't the best practices for clojure be to write something like the original clojure.core/last source code?
Yeah but reimplementing core functionality can't be idiomatic by definiton. Because using the buildin would be the idiomatic way.
ahhh,please see me code of this kata
yes,i get it too.
This is not best practices. This makes an entire copy of the ISeq.
Whoever is voting this stuff "Best Practices", it would be nice to see some explanation...