This repository has been archived on 2024-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
project-euler/e0025/euler0025.rkt

11 lines
238 B
Racket
Raw Normal View History

#lang racket
(define (numdigits x)
(string-length (number->string x)))
(define (fibs limit lst)
(if (equal? (numdigits (car lst)) limit)
(length lst)
(fibs limit (cons (+ (car lst) (cadr lst)) lst))))
(fibs 1000 '(1 1))