dmbaturin/ocamlbook.org

Error: Unbound value a in book/algebraic-types.md

fccm opened this issue · 1 comments

fccm commented
let area s =
  match s with
  | Circle r -> Float.pi *. (r ** 2.0)
  | Square s -> s ** 2.0
  | Triangle (s1, s2, s3) ->
    let s = (s1 +. s2 +. s3) /. 2.0 in
    sqrt @@ s *. (s -. a) *. (s -. b) *. (s -. c)

a, b and c at the last line are unbound.

Another instance of careless editing on my side. Thanks for spotting it!