From: Phrogz Date: 2007-02-12T07:25:05+09:00 Subject: Re: One-Liners (#113) On Feb 11, 9:27 am, "Louis J Scoras" wrote: > def anagrams(quiz) > n=quiz[0].split(//).sort; quiz.select {|i| i.split(//).sort == n } > end Argh! #select is exactly what I should have used. Nice. > def hashify(quiz) > quiz.reverse.inject(){|m,i|{i=>m}} > end How very elegant. I kept thinking there should be a way to bootstrap the inner pair to be like all the outers, but couldn't find it. Well done.