Skip to content

Instantly share code, notes, and snippets.

@trilliwon
Created December 12, 2021 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trilliwon/66bd505b2cc187f4ab171786547708b4 to your computer and use it in GitHub Desktop.
Save trilliwon/66bd505b2cc187f4ab171786547708b4 to your computer and use it in GitHub Desktop.

Standard ML Topics


Pairs, Lists, Local Bindings, Benefit of No Mutation

Records, Datatypes, Case Expressions and more

  • A variable binding
  • The semantics - Syntax is just how you write something - Semantics is what that something means - Type-checking (before program runs) - Evaluation (as program runs)
  • Expressions
  • Variables
  • Conditional Expression
  • Function definitions
  • Recursion
  • Function bindings
  • Function Calls
  • Functions as Parameters
  • Tuples and lists
  • Pairs (2-tuples)
  • Nesting
  • Building Lists
  • Accessing Lists
  • Type-checking list operations
  • Let-expressions
  • Options

Nested Patterns, Exceptions, Tail Recursion

  • Syntactic sugar
  • Records
  • Datatypes
  • Datatype bindings
  • Case
  • Patterns
  • Expression Trees
  • Recursion
  • Recursive datatypes
  • Options are datatypes
  • Lists are datatypes
  • Case Expressions
  • pattern-matching
  • Each-of types
  • Val-binding patterns
  • Function-argument patterns
  • Nested patterns
  • Exceptions
  • Call-stacks
  • Moral of tail recursion

First-Class Functions, Subtyping

  • First-class functions
  • Function Closures
  • Functions as arguments
  • Relation to types
  • Polymorphism and higher-order functions
  • Anonymous functions
  • Map
  • Filter
  • Generalizing
  • Returning functions
  • Type Generality
  • Subtype

Lexical Scope, Function Closures, and Function Closure Idioms

  • Recomputation
  • Another famous function: Fold
  • Combine functions
  • Currying
  • Curried fold
  • Unnecessary function wrapping
  • Iterators
  • References
  • Callbacks
  • Mutable state
  • Library implementation
  • Clients
  • Implementing an ADT

ML Modules

  • Modules
  • Namespace management
  • Signatures
  • Hiding things
  • Hiding with functions
  • Library spec and invariants
  • Abstract types
  • Signature matching
  • Equivalent implementations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment