Map and Reduce in Coldfusion, a pratical example
Tuesday May 24, 2011
A few weeks ago I started a project called
Collections.cfc that brings iteration functions such as map(), reduce() and filter() to Coldfusion collections. JavaScript and a few other languages have had these features for some time so I felt that it would be fun to try and bring that behavior over into the CF world.
Traditionally, functions such as map() and reduce() have been limited to Arrays, but being that Coldfusion rocks hard \m/, I wanted to go one step further and extend the functionality to Structures as well.
This example makes use of both types of collections types (arrays and structs) and several Collections.cfc methods to find the most popular keywords used in the descriptions of the blogs that
ColdfusionBloggers.org aggregates.
read more...
Simple Maze Generation using Coldfusion: Kruskal's Algorithm
Saturday February 19, 2011
In my
first post on maze generation I looked into creating a maze using the simple Recursive Backtracking algorithm. A lot of credit in my understanding of that algorithm and the framework in which to apply the maze algorithms goes to
Jamis Buck and his fantastic series on Maze Generation. Exploring
Kruskal's Algorithm for maze generation was no exception.
read more...