-
-
Save Taneb/e17d338384a62297002983e123d8d59d to your computer and use it in GitHub Desktop.
This file contains 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
module PolyRec where | |
data Foo a = Nil | Foo a (Foo (a, a)) | |
size :: Foo a -> Int | |
size Nil = 0 | |
size (Foo _ xs) = 1 + 2 * size xs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment