Skip to content

Instantly share code, notes, and snippets.

View samisuteria's full-sized avatar

Sami Suteria samisuteria

View GitHub Profile
@samisuteria
samisuteria / ad-manifesto.md
Created October 23, 2018 23:44 — forked from rxwei/ad-manifesto.md
First-Class Automatic Differentiation in Swift: A Manifesto

First-Class Automatic Differentiation in Swift: A Manifesto

This document is written for both the machine learning community and the Swift programming language design community, with a strong focus on language design.

Table of Contents

Inspired from https://drboolean.gitbooks.io/mostly-adequate-guide/content/ch5.html
// Curries by partially applying 1 out of 2 arguments
func curry<A, B, C>(fn: (A, B) -> C, _ val: A) -> (B -> C) {
return { b in
fn(val, b)
}
}
// "compose" operator