Ad

Fun fact, F# treats the arithmetic operators as first-class as well! That means you can use the operators as a prefix OR infix operators.

It's hard to say that this is more idiomatic than the simpler version, but this application celebrates several features of F#

Code
Diff
  • module ExampleSolution
    
      let add a b = (+) a b
    • module ExampleSolution
    • let add a b =
    • let x = a
    • let y = b
    • x + y
    • let add a b = (+) a b