Created
November 7, 2017 10:21
-
-
Save edsko/77196701966333b4852a2cbbe1c7d862 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
{-@ data List [listLen] a = Nil | Cons { hd :: a , tl :: List a } @-} | |
data List a = Nil | Cons a (List a) | |
{-@ measure listLen @-} | |
{-@ listLen :: List a -> Nat @-} | |
listLen :: List a -> Int | |
listLen Nil = 0 | |
listLen (Cons _ cs) = 1 + listLen cs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment