title: Stylus dont push if already exsists (Grid Loop)
body: <p>I'm trying to rewrite the following from SCSS to Stylus:</p>
  
  <p><a href="http://codepen.io/edmoore/pen/qFAGd" rel="nofollow">link to original SCSS codepen grid loop</a></p>
  
  <pre><code>// Total columns for layout
  $total-columns: 6;
  $col-widths: ();
  @for $i from 1 through $total-columns {
      @for $j from 1 through $i {
          $w: ($j/$i);
  
          // If the width doesn't already exist
          @if not index($col-widths, $w) {
              .col-#{$j}-#{$i} {
                  width: $w * 100%;
              }
              // Add the width to the array
              $col-widths: append($col-widths, $w, comma);
          }
      }
  }
  </code></pre>
  
  <p>The part I'm stuck on however is</p>
  
  <pre><code>@if not index($col-widths, $w)
  </code></pre>
  
  <p>where I don't know how to check the col-widths array if the class w already exists and thereby not adding it again.</p>
  
  <p>This is what I got so far but it's not working. What am I missing?</p>
  
  <pre><code>total-columns = 6
  col-widths = ()
  
   for i in 1..total-columns 
     for j in 1..i 
  
       w = (j/i)
  
       if index in col-widths is not w
         .width{j}of{i} 
           lost-column: w
       else
         push(col-widths, w)
  </code></pre>