Sha256: c500681612d788604cf1d6d04ebf788b122fd9379079373ccd66dd7aa8f435ea

Contents?: true

Size: 318 Bytes

Versions: 42

Compression:

Stored size: 318 Bytes

Contents

open Base

module Int_map = Map.M(Int)
type school = string list Int_map.t

let empty_school = Map.empty (module Int)

let add s g school = Map.add_multi ~key:g ~data:s school

let grade g school = Map.find school g |> Option.value ~default:[]

let sorted school = Map.map ~f:(List.sort ~compare:String.compare) school

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.179 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.178 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.177 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.176 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.175 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.174 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.173 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.172 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.171 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.170 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.169 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.167 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.166 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.165 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.164 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.163 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.162 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.161 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.160 tracks/ocaml/exercises/grade-school/example.ml