Categories
General

Update to "How To Disable an Observer in Rails"

I’ve posted an update to How To Disable an Observer in Rails.

Categories
General

Note to self: Randomize a list in Scheme

Using PLT Scheme, I wanted to randomize a list. Here is what I came up with:

(define (random-sort l)
  (sort l
        (lambda (x y)
          (equal? 0 (random 2)))))