Algebraic data types: Difference between revisions

Content added Content deleted
m (→‎{{header|Tailspin}}: Add type bound for equality comparison)
m (→‎{{header|Wren}}: Changed to Wren S/H)
Line 2,608: Line 2,608:
{{trans|Go}}
{{trans|Go}}
Wren doesn't have either algebraic data types or pattern matching though, despite that, the ''T.balance()'' method looks better than I thought it would :)
Wren doesn't have either algebraic data types or pattern matching though, despite that, the ''T.balance()'' method looks better than I thought it would :)
<syntaxhighlight lang="ecmascript">var R = "R"
<syntaxhighlight lang="wren">var R = "R"
var B = "B"
var B = "B"