How to find nodes with a scalar predicate having values found during traversal

Does @filter() work without any function?
Also I don’t think we can use eq() filter over value variables directly. According to docs we can use val(variable) but then it works only in the context of enclosing uid.

In this case I want to search for all blocks which has category predicate same as user → block → category.