Created
February 5, 2013 20:52
-
-
Save Sgeo/4717537 to your computer and use it in GitHub Desktop.
Haskell code to emulate in Scala and Clojure. Idea for the functions taken from http://www.scala-lang.org/api/current/index.html#scala.util.control.TailCalls$
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
listEven :: [a] -> Bool | |
listEven [] = True | |
listEven (_:xs) = listOdd xs | |
listOdd :: [a] -> Bool | |
listOdd [] = False | |
listOdd (_:xs) = listEven xs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Confirmed working with http://ideone.com/3AKuvK