Sha256: 25adf134e931c18a0ee31d773bc4f0f83e156a0c1c2fdff4f6a18d945f838dda

Contents?: true

Size: 285 Bytes

Versions: 108

Compression:

Stored size: 285 Bytes

Contents

open Core

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

108 entries across 108 versions & 1 rubygems

Version Path
trackler-2.1.0.50 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.49 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.48 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.47 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.46 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.45 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.44 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.43 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.42 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.41 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.40 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.39 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.38 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.37 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.36 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.34 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.33 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.32 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.31 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.1.0.30 tracks/ocaml/exercises/grade-school/example.ml