Created
January 23, 2019 12:24
-
-
Save jfdm/ef491908a3ae2865290f9b45899db517 to your computer and use it in GitHub Desktop.
An example of Thinnings for a very specific use case.
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
data CanSkip = MustKeep | CanSkip | |
data ThinnedList : (a : Type) | |
-> (contract : List (Pair a CanSkip)) | |
-> Type | |
where | |
Empty : ThinnedList a Nil | |
Add : (x : a) | |
-> (rest : ThinnedList a xs) -> ThinnedList a ((x,b )::xs) | |
Skip : (rest : ThinnedList a xs) -> ThinnedList a ((x,CanSkip)::xs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment