Skip to content

Instantly share code, notes, and snippets.

View darkoverlordofdata's full-sized avatar

Bruce Davidson darkoverlordofdata

View GitHub Profile
@darkoverlordofdata
darkoverlordofdata / database.ml
Created December 13, 2015 19:05 — forked from atavener/database.ml
OCaml in-memory "database" -- I use this for component-based game-objects.
(* Database provides key-generation and table-instantiation,
* so that a key can be associated to various properties.
*)
(* This is for a fully-controlled specification...
*
* module Db = Database.Make (Database.IntKey)
* module Prop = Db.MultiInherit
* module PropHash = Prop.Table(Database.Hash)
* module Size = (val PropHash.create ~default:0 () : Db.Sig with type t = int)