fork download
  1. #lang racket
  2.  
  3. (define (programming048 . args)
  4. (foldl (lambda (s-2 s-1)
  5. (string-append s-1
  6. (substring s-2
  7. (foldl (lambda (cnt init)
  8. (if (string-ci=? (substring s-1 (- (string-length s-1) cnt))
  9. (substring s-2 0 cnt))
  10. cnt
  11. init))
  12. 0
  13. (range 1 (add1 (apply min (map string-length `(,s-1 ,s-2)))))))))
  14. (car args) (cdr args)))
Success #stdin #stdout 0.54s 78024KB
stdin
Standard input is empty
stdout
Standard output is empty