collectrep.ml first try

This is meant to collect any repetitions into a sublist! It does not
work :(
There appears to be a syntax error, but I’m not sure what it is. It
might be that there’s a type error. It might require defining a new
type or something.