github/dat-science — pull request #2 by bhuga (2013-03-01 12:04:13+00:00)
Title: Not everything's a boolean

The first thing I tried to use this on was loading a list of widgets, and the results on failures were absolutely massive. I was shaving it down in the publisher, but it felt weird to write experiment-specific stuff in the results handler. So now you can do:

```ruby
science "widget-loading" do |e|
e.control { Widget.scope.scope.all }
e.candidate { Widget.new_scope.all }
e.transform { |result| result.map(&:id).sort }
end
```

The comparison and publish both happen on the transformed version.

I also think there might be a use for custom comparison functions (floats or unordered comparison, for example) but it's a little less clear how to tack that on to `Result`.