We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46061ef commit f9e6daeCopy full SHA for f9e6dae
samples/snippets/fsharp/tour.fs
@@ -479,8 +479,8 @@ module UnionTypes =
479
| Empty -> Node(item, Empty, Empty)
480
| Node(x, left, right) as node ->
481
if item = x then node // No need to insert, it already exists; return the node.
482
- elif item < x then Node(item, insert x left, right) // Call into left subtree.
483
- else Node(item, left, insert x right) // Call into right subtree.
+ elif item < x then Node(x, insert item left, right) // Call into left subtree.
+ else Node(x, left, insert item right) // Call into right subtree.
484
485
// ---------------------------------------------------------------
486
// Option types
0 commit comments