Created
July 7, 2021 15:55
-
-
Save bond15/1d41882477b50f8d6f61963831f39dbd to your computer and use it in GitHub Desktop.
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
| {-# OPTIONS --copatterns #-} | |
| module streams where | |
| record Stream (A : Set) : Set where | |
| coinductive | |
| field | |
| hd : A | |
| tl : Stream A | |
| open Stream | |
| data Foo : Set where | |
| A B : Foo | |
| Foos : Foo -> Stream Foo | |
| hd (Foos A) = B | |
| hd (Foos B) = A | |
| tl (Foos f) = Foos f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment