`find` definition with pattern matching