Idris2/tests/idris2/perror029/DelayParse.idr

14 lines
256 B
Idris
Raw Normal View History

module DelayParse
public export
data MyStream : Type where
(::) : (anA : a)
-> (nextA : a -> a)
-> Inf MyStream
-> MyStream
public export
go : a -> (a -> a) -> MyStream
go initA fn =
MyStream.(::) initA fn (Delay (fn initA) fn)