[typo] Mmm... higher order code

Piers Cawley pdcawley at bofh.org.uk
Tue Mar 21 12:30:29 EST 2006

Mmm... I love this programming language.

I've just written the following:

  def perform_action_without_filters
    scope_hash = {:find => {:conditions => "blog_id = #{this_blog.id}"},
                  :create => {:blog_id => this_blog.id}}
    blog_scoped_model_classes.inject(lambda {super}) do |block, klass|
      lambda { klass.with_scope(scope_hash, &block) }

And I fully expect it to work. Do you think I've spent to long
programming in lisp?

Piers Cawley <pdcawley at bofh.org.uk>

More information about the Typo-list mailing list