Define group
Define position
Define count
Define sum-list
Define max-list and min-list
Define adjacent?