This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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)) | |
) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
NewerOlder