Skip to content

Instantly share code, notes, and snippets.

View jshiell's full-sized avatar

Jamie Shiell jshiell

View GitHub Profile
@jshiell
jshiell / exercise.clj
Created March 23, 2012 12:35
Clojure Exercises
; http://aperiodic.net/phil/scala/s-99/
; P01 - find the last element of a list
(defn p01 [the-list]
(if (empty? (rest the-list))
(first the-list)
(recur (rest the-list))
)
)
@jshiell
jshiell / sehs
Created November 24, 2011 11:56
Scala equals/hashCode/toString Live Template
override def toString = new ToStringBuilder(this)
.toString
override def equals(obj: Any) = obj match {
case other: $CLASSNAME$ => other.getClass == getClass &&
new EqualsBuilder()
.isEquals
case _ => false
}