[ create a new paste ] login | about

Link: http://codepad.org/8DH8mCTQ    [ raw code | output | fork ]

programmingpraxis - Scheme, pasted on Oct 13:
1
2
3
4
5
6
7
8
9
(define temp-list (list '398 '150 '1.15 '2875 '-900 '1565 '800 '230 '200 '0 '0 '0))

(define b
    (let loop ((xs temp-list) (zs '()))
      (if (null? (cdr xs))
          (apply string-append (reverse (cons (number->string (car xs)) zs)))
          (loop (cdr xs) (cons " " (cons (number->string (car xs)) zs))))))

(write b)


Output:
1
"398 150 1.15 2875 -900 1565 800 230 200 0 0 0"


Create a new paste based on this one


Comments: