Add make-string, object->string.

* module/mes/guile.mes (make-string, object->string): New functions.
This commit is contained in:
Jan Nieuwenhuizen 2016-12-26 00:17:21 +01:00
parent 02895340de
commit da6bd4cf97

View file

@ -25,6 +25,13 @@
(define-macro (define-module module . rest) #t) (define-macro (define-module module . rest) #t)
(define-macro (use-modules . rest) #t) (define-macro (use-modules . rest) #t)
(define (make-string n . fill)
(list->string (apply make-list n fill)))
(define (object->string x . rest)
(with-output-to-string
(lambda () ((if (pair? rest) (car rest) write) x))))
(define (port-filename p) "<stdin>") (define (port-filename p) "<stdin>")
(define (port-line p) 0) (define (port-line p) 0)
(define (simple-format port format . rest) (map (lambda (x) (display x port)) rest)) (define (simple-format port format . rest) (map (lambda (x) (display x port)) rest))