Seven Hong

Lambda Calculus, Lisp, Functional Programming, Reusable & Readable Code.

How to Confuse the Difference Between Conj and Cons in Clojure

I wrote this post as a JOKE after reading Baptiste Fontaine’s post. If you actually want to learn how to remember the difference between conj and cons:

  1. Read original post by Baptiste Fontaine here.
  2. Don’t read this post unless you are sure that you can easily tell the difference between conj and cons. Otherwise you will be really confused.

Now, if you still want to read this post:
Screen Shot 2014-05-26 at 2.28.04 PM.png
This means that cons pushes elements at the end of a vector. conj, on the other hand, pushes elements at the beginning of a vector. That’s it. Once you see this in your head, you’ll never remember the difference between cons and conj on a vector.

You know what. After keep looking at both Baptiste Fontaine’s picture and mine, I am confused a little bit too.


Continue reading →