Re: RosettaCode
- Posted by bruce1961 Jan 26, 2011
- 1981 views
include std/math.e function sine( object x ) return sin(x) end function function compose( integer f, integer g, object x ) return call_func( f, {call_func( g, {x} )} ) end function integer iSine = routine_id("sine") integer iArcSin = routine_id("math:arcsin") ? iSine ? iArcSin object func = compose( iSine, iArcSin, 0.5 ) ? func
That seems to work better, giving '0' and '1' for the routine_ids.
Bruce.