Skip to content

Instantly share code, notes, and snippets.

@bond15
Created July 7, 2021 15:55
Show Gist options
  • Select an option

  • Save bond15/1d41882477b50f8d6f61963831f39dbd to your computer and use it in GitHub Desktop.

Select an option

Save bond15/1d41882477b50f8d6f61963831f39dbd to your computer and use it in GitHub Desktop.
{-# 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