Monday, December 13, 2010

scala specs functional matchers

I was reading and wondered if new matchers could be defined more tersely than:

So here it is, with a couple of implicits:

The example shows how to promote a function to a matcher. Currently I didn't find how to define
a function literal with call-by-name semantics, but for simple matchers where a call-by-value semantic is acceptable this trick works fine.


  1. You can have a look at the new ways to create matchers in specs2, they are much easier to create now.

  2. Obtain Quick Facebook Auto likes on Status and Click Here Photographs and videos and also DJ Liker Download on your Android, PC & iPhone Devices statements messages within DJ Liker App secs status & photos likes messages DJ Liker within some minutes.