p036.scm 409 B

12345678910111213
  1. ;; Double-base palindromes
  2. (ns (euler solved p036))
  3. (use (euler utils))
  4. (def double-base-palendromes (:o (limit :or (^ 10 6)))
  5. (loop ((for i (up-from 1 (to limit)))
  6. (where palendromes '()
  7. (if (and (palendromic? (str i))
  8. (palendromic? (number->binary i)))
  9. (cons i palendromes)
  10. palendromes)))
  11. => palendromes))