pascalabcnet/TestSuite/lam_yield.pas

9 lines
120 B
ObjectPascal
Raw Permalink Normal View History

2020-06-21 21:46:50 +03:00
function f1: sequence of byte->byte;
begin
yield b->b*b;
end;
begin
var q := f1().First;
Assert(q(2)=4);
end.