News for hackers. Stuff that matters.
Re:Get Started with F# as a C# developer by nullspace on Friday July 28, 2017 @01:39PM (#14876036)

  // Flip the BST using pattern matching!
  let rec flip bst =
    match bst with
    | Empty -> bst
    | Node(item, left, right) -> Node(item, flip right, flip left)

Without type annotations, how can it tell the flip takes an instance of BST as the parameter?
Re:Get Started with F# as a C# developer by omaranto on Friday July 28, 2017 @01:46PM (#14876095)
The variable bst is something that can be matched with Empty and with Node(item, left, right), both of which are of type BST. When two values can be matched with each other, they must be of the same type. Therefore bst is of type BST too.