RosettaCodeData/Task/Function-composition/FunL/function-composition.funl

8 lines
121 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
import math.{sin, asin}
def compose( f, g ) = x -> f( g(x) )
sin_asin = compose( sin, asin )
println( sin_asin(0.5) )