RosettaCodeData/Task/Higher-order-functions/F-Sharp/higher-order-functions-1.fs

7 lines
118 B
Forth
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
> let twice f x = f (f x);;
val twice : ('a -> 'a) -> 'a -> 'a
> twice System.Math.Sqrt 81.0;;
val it : float = 3.0