Idris2-boot/tests/ttimp/lazy001/input
Edwin Brady c75569c255 Implement laziness
Slight change of plan: instead of having special names, add Lazy, Inf,
Delay and Force and keywords and elaborate them specially.
Correspondingly, add DelayCase for case trees. Given that implicit
laziness is important, it seems better to do it this way than constantly
check whether the name we're working with is important.

This turns out to make implicit laziness much easier, because the
unifier can flag whether it had to go under a 'Delayed' to succeed, and
report that back to the elaborator which can then insert the necessary
coercion.
2019-05-22 19:42:43 +01:00

5 lines
69 B
Plaintext

ones
take (S (S (S Z))) ones
every2nd (S (S (S Z))) (countFrom 1)
:q