I found the following sentence while reading technical documentation but the use of "to which" doesn't seem right, which expression would you use here ?
Returns a list of lists where the elements to which function is true are grouped together.
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.
You're right: it doesn't make sense. In fact, without knowing the context, I'm not comfortable guessing at the actual meaning.
But the most straightforward way I see here is: replace to with for, and function needs an article, presumably the:
So the command returns a list, which consists of lists of grouped elements for each of which the function (whatever it is) returns true. I hope I got the original intent right.
It seems correct to me. You could also write it like this: