Calls a map function only for quads matching the given triple pattern.