Skip to content

Instantly share code, notes, and snippets.

Dave Cameron davcamer

Block or report user

Report or block davcamer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davcamer
davcamer / P01.scala
Created Sep 10, 2016
Scala99 solutions
View P01.scala
def last[A](l: List[A]) = l match {
case head :: tail => tail.foldLeft(head)((a,e) => e)
case _ => throw new NoSuchElementException
}
You can’t perform that action at this time.