Created
January 28, 2012 03:55
-
-
Save jordanlewis/1692508 to your computer and use it in GitHub Desktop.
PFDS catenate
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
def catenate[A](xs: List[A], ys: List[A]) : List[A] = xs match { | |
case Nil => ys | |
case x::xs => x :: (catenate(xs, ys)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment