RN
RN

Tail recursion

A brief intro to tail recursion

Robbie Nohra
November 04, 2018

Suppose we would like to compute the sum of the elements of a list List[Int].

Consider the following recursive solution.

def sum[A](list: List[A]): Int = {
 list match { 
 case Nil => 0
 case x :: xs => x + sum(xs) 
 }
}

The following call to sumwill result in a StackOverflowError.

sum((0 to . . .

Read More

Currying

A brief intro to currying

Robbie Nohra
November 04, 2018

We have the following function.

def add(x: Int, y: Int): Int = {
x + y
}

with the following signature

add: (x: Int, y: Int)Int

That is, add is a map from the space of integer 2-tuples to the space of integers.

We say the function has an arity of n or is an n-ary function if it takes n arguments.

. . .

Read More

Referential transparency

Intro to referential transparency

Robbie Nohra
November 04, 2018

The notion of an immutable binding is the notion that a variable can be bound to a value at most once.

Consider the following execution block.

val a = "Hello"
val b = a.reverse

The method reverse does not mutate a. If one calls a at a later point the return value will still be Hello.

One could . . .

Read More

Shannon's Entropy Metric for Information

A brief intro to information entropy

Robbie Nohra
November 04, 2018

Understanding Shannon's Entropy metric for Information

Read More

The weak law of large numbers

A brief proof of the weak law of large numbers

Robbie Nohra
November 04, 2018

The weak law of large numbers

Read More

Papers & manuscripts

Links to papers I've written

Robbie Nohra
November 04, 2018

Smirnov’s Theorem Simplified — Crossing Probability on a Hexagonal Lattice

Introduction to Random Walks on Groups

The Price of Anarchy

The Distribution of Roots of a Polynomial

Submartingale Convergence: A Measure-Theoretic Approach

Calderón Revisited — A Synopsis

Read More

All Categories: probability(1) home

Archive
   Subscribe by email and never miss a post.