Skip to content

Instantly share code, notes, and snippets.

@valvallow
Created February 10, 2010 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valvallow/300236 to your computer and use it in GitHub Desktop.
Save valvallow/300236 to your computer and use it in GitHub Desktop.
9 x 9
(use srfi-1)
(define 9x9
(lambda (row cnt inc mul)
(append
(cons
(map (lambda (n)
(cons (cons mul n)(cons (* n mul) '())))
(iota cnt 1 inc))
(if (zero? row)
'()
(9x9 (- row 1) cnt inc (+ mul 1)))))))
(9x9 9 9 1 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment