Skip to content

Instantly share code, notes, and snippets.

View Y-jiji's full-sized avatar
🤯
In search of my mentor

Andy Yang Y-jiji

🤯
In search of my mentor
View GitHub Profile
@HarrisonGrodin
HarrisonGrodin / dynamic-dispatch.sml
Created August 13, 2021 06:13
Simple model of Python-style dynamic dispatch in Standard ML via dynamic classification
signature OBJECT =
sig
type 'a tag
type t
val new : unit -> t list tag
and make : 'a tag -> 'a -> t
val get : t -> 'a tag -> 'a
(* primitives *)