1. 6
  1.  

  2. 2

    racket has them built in: http://docs.racket-lang.org/guide/for.html

    implementation here, though i won’t pretend to understand it :)