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.1.0.21 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.20 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.19 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.18 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.17 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.16 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.15 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.14 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.13 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.12 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.11 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.10 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.9 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.8 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.7 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.6 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.5 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.4 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.3 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.2 tracks/ocaml/exercises/grade-school/example.ml