Created
May 25, 2013 16:26
-
-
Save neumino/5649643 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reduction := func(left, right r.Exp) r.Exp { return left.Or(right) } | |
filterFunc := func (job r.Exp) r.Exp { | |
return job.Attr("categories").Map(func (category r.Exp) r.Exp { | |
return category.Eq(job.Attr("category") | |
}).Reduce(reduction, false) | |
} | |
r.Table("heroes").Filter(r.Row.Attr("area").Eq("area")).Filter(filterFunc) |
Author
neumino
commented
May 25, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment