Re: RosettaCode

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...
bruce1961 said...

Nice to see some folk have taken up the challenge.

Is it fair enough to assume that Function Composition is impossible in Euphoria?

No, you can do it using routine_ids:

function compose( integer f, integer g, object x ) 
    return call_func( f, {call_func( g, {x} )} ) 
end function 

Matt

That isn't really function composition though. The compose function should only take arguments f and g, and return a routine_id, not a value.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu