Arithmetic evaluation: Difference between revisions

→‎{{header|Tailspin}}: Add type information (sum types conflict with autotyping)
(Added Dyalect)
(→‎{{header|Tailspin}}: Add type information (sum types conflict with autotyping))
Line 6,110:
=={{header|Tailspin}}==
<lang tailspin>
def ops: ['+','-','*','/'];
 
data binaryExpression <{left: <left>, op: <?($ops <[<=$>]>)>, right: <right>}>
data left <binaryExpression|"1">
data right <binaryExpression|"1">
 
templates leftAssociate
when <[](1)> do $(1) !
Anonymous user