Extra geeky: the recursive lambda
I'm not sure where I first heard that you could do a recursive lamdba in Ruby, but it's been simmering on the back burner of my brain for a while. I've just never had a reason to use one, until now... I wanted to process the Rails request params, which is a hash of strings and hashes of strings and hashes of strings and hashes... you get the idea. The need was to strip all the accent marks from user input throughout the application. Here's what I came up with: class ApplicationController < ActionController::Base before_filter :strip_accents protected def strip_accents thunk = lambda do |key,value|...






