Ruby, iOS, and Other Development

A place to share useful code snippets, ideas, and techniques

All code in posted articles shall be considered public domain unless otherwise noted.
Comments remain the property of their authors.


Just a Nifty Meta-Meta Tidbit

Sometimes you just write a piece of code that makes you feel like you should give it a violently animating background. I'm just not that cool, though, so I'll just go with my usual syntax coloring:

def hashtastic(value)
  (Proc === value) ?
    lambda { |h,k| h[k] = } :
    lambda { |h,k| h[k] = value }

a ={}))))
b = a[0]
c = b[0]
d = c[0]

p a

Try it out. I think you'll find you like it. Enjoy!

Labels: ,


Post a Comment

Links to this post:

Create a Link

<< Home