Created
July 2, 2012 08:42
Revisions
-
tomasherman created this gist
Jul 2, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ //E 3.3.4 def init[A](l: List[A]): List[A] = { l match { case Nil => Nil case Cons(x,Nil) => Nil case Cons(x,xs) => Cons(x,init(xs)) } }