in #jq, in an array, having a predicate f over its elements, how do i get, foreach elem that satisfies f, a pair (object) of that elem and the last preceding elem that didnt satisfy f? this is a jq HW task, refined by me. original unrefined task advised to use function & variable