Sha256: f863aadb3f222808e612c85174c9d6e657ac7aa029d4249ec7cd60343619758e

Contents?: true

Size: 289 Bytes

Versions: 177

Compression:

Stored size: 289 Bytes

Contents

open Core.Std

type school = string list Int.Map.t

let create _ = Int.Map.empty

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 sort school = Map.map ~f:(List.sort ~cmp:compare) school

let to_map = ident

Version data entries

177 entries across 177 versions & 1 rubygems

Version Path
trackler-2.0.8.16 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.15 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.14 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.13 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.12 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.11 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.10 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.9 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.8 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.7 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.6 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.5 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.4 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.3 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.2 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.8.1 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.7.0 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.6.44 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.6.43 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.0.6.42 tracks/ocaml/exercises/grade-school/example.ml