Intermediate steps not committed - addresses_as_list, because long stack trace in output. turned out 'nil' case needs to be explicit now. I prefer the small functions though instead of whole implementation in case statement.
http://sequential:4242/c/622ae09e-9470-43fb-8a3f-e85a90322f9a