Re: RosettaCode

new topic     » goto parent     » topic index » view thread      » older message » newer message
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.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu