mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 02:31:50 +03:00
14 lines
256 B
Idris
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)
|