Algorithm W (source code)

= Algorithm W
{c}

<Algorithm W> performs <type inference> by traversing the program's <abstract syntax tree>, introducing fresh <type variables>, combining <type substitutions> obtained by <type unification>, and generalizing eligible `let` bindings. It distinguishes fresh instances of a <type scheme> from the shared monomorphic types of parameters to a <lambda abstraction>.