Idris2/tests/idris2/perror029/DelayParse.idr
2023-08-04 13:39:39 +01:00

14 lines
256 B
Idris

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)