let auc points = match Stream.next points with
    None -> 0.
  | Some p ->
    Stream.fold
      points
      ~f:(fun ((x1,y1), sum) ((x2,y2) as p) ->
        (p, sum +. trapez_area x1 x2 y1 y2))
      ~init:(p, 0.)
    |! snd