Arithmetic/Integer: Difference between revisions

first add with lambdatalk
(first add with lambdatalk)
Line 2,543:
{{VI snippet}}<br/>
[[File:LabVIEW_Arithmetic_Integer.png]]
 
=={{header|Lambdatalk}}==
Translation of Racket
<lang Scheme>
{def arithmetic
{lambda {:x :y}
{S.map {{lambda {:x :y :op}
{br}applying :op on :x & :y returns {:op :x :y}} :x :y}
+ - * / % pow max min = > <}}}
-> arithmetic
 
{arithmetic 8 12}
->
applying + on 8 & 12 returns 20
applying - on 8 & 12 returns -4
applying * on 8 & 12 returns 96
applying / on 8 & 12 returns 0.6666666666666666
applying % on 8 & 12 returns 8
applying pow on 8 & 12 returns 68719476736
applying max on 8 & 12 returns 12
applying min on 8 & 12 returns 8
applying = on 8 & 12 returns false
applying > on 8 & 12 returns false
applying < on 8 & 12 returns true
</lang>
 
=={{header|Lasso}}==