Quick Sort in Shen
A Shen type-checked implementation of Quick Sort is even more elegant/terse compared with the CL version posted previously. Pattern-matching and currying make this possible. (tc +) (define filter {(A...
View ArticleWelcome to John McCarthy’s new website.
From the website: John was a legendary computer scientist at Stanford University who developed time-sharing, invented LISP, and founded the field of Artificial Intelligence.* In March 2011 John...
View ArticlePurely Functional Data Structures & Algorithms : Union-Find
It’s been a while since I last posted in this series. Today we look at the disjoint-set data structure, specifically disjoint-set forests and the complementary algorithm : union-find. In computing, a...
View ArticlePurely Functional Data Structures & Algorithms : Union-Find (Haskell)
*Updated 08-23-2012 01:04:38* Replaced the use of Data.Vector with the persistent Data.Sequence which has O(logN) worst case time complexity on updates. A Haskell version of the previous code using the...
View ArticlePurely Functional Data Structures & Algorithms : Selection Sort
*Updated @ 2012-08-31 02:08:58 due to internet pedantry* Previously, previously. According to Wikipedia : In computer science, a Selection sort is a sorting algorithm, specifically an in-place...
View ArticleClojure’s growing popular mind share
Popular interest in Clojure has rapidly increased over the last few years since 2008, almost to the level of Java (the language) today, which has dropped off significantly. (At least according to...
View ArticleRing probabilities with Elixir
I’ve been hearing more about Elixir lately so I thought I’d take it for a spin. “Elixir is a functional, meta-programming aware language built on top of the Erlang VM. It is a dynamic language that...
View ArticleRing probabilities in F#
A few months back I took a look at Elixir. More recently I’ve been exploring F# and I’m very pleased with the experience so far. Here is the ring probabilities algorithm implemented using F#. It’s...
View ArticleTwo sorts with Rust
Here are some initial thoughts on Rust in the almost two years since I last looked at it along with some implementations of merge and quick sort. (These are just my opinions so please don’t panic !) 1....
View ArticleQuick Sort in Common Lisp
After watching some of Tim Roughgarden’s videos on sorting algorithms, I thought I’d post an implementation of quick sort in Common Lisp as an example of a sorting algorithm implemented in CL. It’s a...
View Article