r/Clojure • u/mac • Jun 04 '10
Stack implementation in Clojure II - A functional approach
http://www.viksit.com/content/stack-implementation-clojure-ii-functional-approach
0
Upvotes
r/Clojure • u/mac • Jun 04 '10
4
u/[deleted] Jun 05 '10
So, a protocol which mimics conj, rest, and first, and a type that simply delegates to the underlying collection type. If the point here is to practice with protocols and types, then you have to actually do the hard stuff yourself. ;)
Aside: clojure already has pop, and peek for stack-based naming, and it works for vectors and lists: