| Original Message (ID '272048') By Bill Simpson: |
| This is stunningly slower than the previous iterative solution when given a list of 10^4 elements, but does show that Count can be forced to solve your problem.
Count[Partition[numbers//.{x___,y_,y_,z___} -> {x,y,z}, 3, 1],{x_,y_,z_}/;(xz || x>y&&y |
|