factoring out a Cons.is_circular method