Jump to content

Higher-order functions: Difference between revisions

Added Bracmat
(→‎{{header|REXX}}: added the REXX language. -- ~~~~)
(Added Bracmat)
Line 173:
return
</lang>
 
=={{header|Bracmat}}==
<lang bracmat>( (plus=a b.!arg:(?a.?b)&!a+!b)
& ( print
= text a b func
. !arg:(?a.?b.(=?func).?text)
& out$(str$(!text "(" !a "," !b ")=" func$(!a.!b)))
)
& print$(3.7.'$plus.add)
& print
$ ( 3
. 7
. (=a b.!arg:(?a.?b)&!a*!b)
. multiply
)
);</lang>
Output:
<pre>add(3,7)=10
multiply(3,7)=21</pre>
 
=={{header|Brat}}==
483

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.