mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-25 12:42:02 +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)
|