RosettaCodeData/Task/Function-composition/Lambdatalk/function-composition.lambdatalk

17 lines
203 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
{def compose
{lambda {:f :g :x}
{:f {:g :x}}}}
-> compose
{def funcA {lambda {:x} {* :x 10}}}
-> funcA
{def funcB {lambda {:x} {+ :x 5}}}
-> funcB
{def f {compose funcA funcB}}
-> f
{{f} 3}
-> 80