#lang racket
(require racket/format)

(define pp_number
  (lambda (n)
     (~a n #:width 6 #:align 'right  #:left-pad-string "0")))

(define fp
  (lambda (s n)
    (string-append (pp_number n) " + " s)))

(define f
  (lambda (s n)
    (format "~a + ~a" n s)))

(foldl f "" '(1 2 3))
; works great !

(foldl fp "" '(1 2 3))
; and why not this one ?

Thanks in advance.

You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to