Parametric polymorphism allows code to work with any type T
Image: Thomas Kitchin, Public domain, via Wikimedia Commons
Parametric polymorphism allows code to work with any type T
Parametric polymorphism enables a single piece of code to operate on different types without modification. This uniformity allows for more reusable and maintainable code.
Example
A function `add` that takes two parameters of any type T can be defined as `add<T>(x: T, y: T): T` and works for integers, strings, or any other type.
Remember this
It simplifies code and reduces redundancy, making software development more efficient.
Text adapted from Wikipedia, licensed under CC BY-SA 4.0.
Curry–Howard correspondence
Proofs are programs, types are propositions
Kullback–Leibler divergence
KL divergence is not symmetric: D_KL(P||Q) ≠ D_KL(Q||P)
Dependent type
Dependent types depend on values, not just types
Characteristic function (probability theory)
Characteristic function φ(t) = E[e^(itX)] is the Fourier transform of the PDF
Lambda calculus
Lambda calculus represents data using only functions
the Y combinator does: enables recursion in languages without named functions
Y Combinator launched over 5,000 companies
Swipe through 100 ML concepts daily
Open Pocket Polymath