title: Assign each number to 3 turtles
body: <p>I am creating a program that creates 1,500 "scientists" (turtles), in a world where there are 1500 "disciplines". </p>
  
  <p>I need to assign each turtle a "discipline" as a number between 1-500, and ensure that there are 3 turtles for each discipline.  </p>
  
  <p>This means that set(random) isn't appropriate. Is there a primitive I can use? </p>
  
  <p>Nevermind, I think I have figured it out.  Does this make sense? </p>
  
  <pre><code>  to set-discipline
      ask turtles [ set discipline -1 ]
      let unassigned turtles
      let current 1
      while [any? unassigned]
      [
        ask n-of (min (list group-size (count unassigned))) unassigned
          [ set discipline current ]
        set current current + 1
        set unassigned unassigned with [discipline = -1]
      ]
    end
  </code></pre>