RosettaCodeData/Task/Higher-order-functions/Pascal/higher-order-functions-1.pa...

16 lines
215 B
Plaintext

program example(output);
function first(function f(x: real): real): real;
begin
first := f(1.0) + 2.0;
end;
function second(x: real): real;
begin
second := x/2.0;
end;
begin
writeln(first(second));
end.