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.2.1.27 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.26 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.25 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.24 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.23 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.22 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.21 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.20 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.19 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.18 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.17 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.16 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.15 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.14 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.13 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.12 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.11 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.10 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.9 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.8 tracks/ocaml/exercises/grade-school/example.ml