package cpm

  1. Overview
  2. Docs

Module Cpm.TopKeeperSource

Sourcetype t
Sourceval create : int -> t

create n creates a Top_keeper.t that will keep up to n best elements

Sourceval add : string -> float -> t -> t

add name score add score score to the top_keeper under name name (if the score is good enough or if the top_keeper doesn't hold enough elements currently)

Sourceval high_scores_first : t -> (float * string) list

high_scores_first tk retrieves the n best scores (with associated names) that were kept by tk

OCaml

Innovation. Community. Security.