11 Oct '13, 5pm

Hash Maps as Mini State Machines

This code is much more concise, but perhaps not as clear. However, for the problem Ryan and I were dealing with on Friday, we couldn't use numbers: we needed to use keywords. We had two states: ":checked" and ":unchecked" and possibly nil. We needed a clear, concise way to toggle between these three states, without writing an ugly case/cond block. In my mind I thought, "we need a function that will return a new state, given an old state. A function that takes a single arg, and returns the new state value." And then I remembered: "Clojure hash maps are functions! And they take a single value (key) and return a single result (value)." Well then, we can write our state transitions with this little bit of code:

Full article: http://thinkrelevance.com/blog/2013/02/18/hashmaps-as-min...

Tweets

@heyyouapp Singapore Maps - Download MRT, LRT M...

heyyou-app.com 11 Oct '13, 1am

★★★★★This is a fast PDF viewer designed to view large travel map files for Singapore. Most PDF software on iPhone cannot h...

@heyyouapp Singapore Maps - Download MRT, LRT M...

heyyou-app.com 10 Oct '13, 10am

★★★★★This is a fast PDF viewer designed to view large travel map files for Singapore. Most PDF software on iPhon...

F56 MINI to feature new driver assist systems

F56 MINI to feature new driver assist systems

paultan.org 11 Oct '13, 11am

MINI will also get a new park assist function, which uses ultrasound sensors to detect parking spaces at speeds of under 3...

DIY HHO Mini Torch

DIY HHO Mini Torch

hackaday.com 12 Oct '13, 5am

Fascinated by hydrolysis apparatuses? Me too. Here’s a cool how-to that might convince you to make one! It’s a very simple...

Adventure is only a state of mind via @sharethis

howies.co.uk 13 Oct '13, 7pm

Two years ago our friend Alastair Humphreys visited us at howies HQ on the West coast of Wales as part of his year of Micr...

Bodum Mini Santos E, Shannon Oswald

coffeegeek.com 10 Oct '13, 3pm

I have been a fan of Bodum for many years. In the eighties, my father purchased a Bodum Santos from a Barnies Coffee store...

Google Maps Takes Us Inside the Museo Lamborghini: Adding to its growing list of attractions, Google Maps has

Google Maps Takes Us Inside the Museo Lamborghi...

slamxhype.com 14 Oct '13, 8am

Adding to its growing list of attractions, Google Maps has made it possible to visit the Lamborghini Museum in Sant’Agata ...