Some years ago, I got a "brainball" as a present, a game similar to a rubiks cube and supposed to be pretty hard. I was not able to solve it by hand, so I decided to write a solver in Rust.

You may have heard that in Haskell "once it compiles, it works". While this seems to apply in Haskell more than in other languages, a compiling program is not guaranteed to be bug-free, even if you might think so. In this post, I shortly want to showcase an example I experienced and what I hopefully learned from it.

I was never an expert of lambda-calculus , but I always wanted to learn (at least the basics of) it. So, I decided to write a very simplistic interpreter for the untyped lambda calculus.

I was never an expert of lambda-calculus , but I always wanted to learn (at least the basics of) it. So, I decided to write a very simplistic interpreter for the untyped lambda calculus.

During my studies, we had to take the lecture "Discrete Probability Theory" which quickly became one of my favourite ones. The day before the exam, I found the following riddle in the internet (see here):

n persons, all of different heights are standing in a queue facing the window of ticket distributor in a cinema hall. What is the expected number of persons visible to the person at the ticket window if each permutation of n persons is equally likely?

Over time, I found some solutions to this problem, and I'd like to present them to you.