RosettaCodeData/Task/Higher-order-functions/DWScript/higher-order-functions.dw

14 lines
207 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
type TFnType = function(x : Float) : Float;
function First(f : TFnType) : Float;
begin
Result := f(1) + 2;
end;
function Second(f : Float) : Float;
begin
Result := f/2;
end;
PrintLn(First(Second));