Algebraic data types: Difference between revisions
Content added Content deleted
(Add reference to "Red-Black Trees in a Functional Setting") |
m (→{{header|Tailspin}}: update to latest) |
||
Line 2,503: | Line 2,503: | ||
templates ins&{into:} |
templates ins&{into:} |
||
when <?($into <={}>)> do { colour: 'red', left: {}, value: $, right: {}} ! |
when <?($into <={}>)> do { colour: 'red', left: {}, value: $, right: {}} ! |
||
when <..$into.value> do { $into..., left: $ -> ins&{into: $into.left}} -> balance ! |
when <..$into.value::raw> do { $into..., left: $ -> ins&{into: $into.left}} -> balance ! |
||
otherwise { $into..., right: $ -> ins&{into: $into.right}} -> balance ! |
otherwise { $into..., right: $ -> ins&{into: $into.right}} -> balance ! |
||
end ins |
end ins |