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.159 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.158 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.157 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.156 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.155 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.154 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.153 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.152 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.151 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.150 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.149 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.148 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.147 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.146 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.145 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.144 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.143 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.142 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.141 tracks/ocaml/exercises/grade-school/example.ml
trackler-2.2.1.140 tracks/ocaml/exercises/grade-school/example.ml