Skip to content

Instantly share code, notes, and snippets.

@eribeiro
Created August 14, 2013 17:56
Show Gist options
  • Save eribeiro/6233653 to your computer and use it in GitHub Desktop.
Save eribeiro/6233653 to your computer and use it in GitHub Desktop.
Exercise of the first chapter of Okasaki's Functional Data Structures.
def suffix(l: List[Int]): List[List[Int]] = l match {
case Nil => List()::Nil
case _ => l :: suffix(l.tail)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment