title: Swift Increment through Enum
body: <p>I love that Swift allows for the use of enum methods.  I'm trying to work with a method but am looking for a more extensible method of doing this:</p>
  
  <pre><code>enum CopyState{
      case binary, hex, both
      init(){
          self = .both
      }
      mutating func next() {
          if self == .binary{
              self = .hex
          } else if self == .hex {
              self = .both
          } else if self == .both{
              self = .binary
          }
      }
  }
  
  var state = CopyState()
  
  state.next()
  </code></pre>
  
  <p>I'd like to essentially cast the enum to an integer and increment it modulo the number of total enum options</p>
  
  <p>Adding or removing enum options is a hassle (I'm using a last() and a next() method).</p>