Add drain-input.
* module/mes/guile.mes (drain-input): New function.
This commit is contained in:
parent
cc68c1cda8
commit
b8fd6ca7b9
|
@ -1,7 +1,7 @@
|
|||
;;; -*-scheme-*-
|
||||
|
||||
;;; Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2016,2017 Jan Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of Mes.
|
||||
;;;
|
||||
|
@ -25,6 +25,11 @@
|
|||
(define-macro (define-module module . rest) #t)
|
||||
(define-macro (use-modules . rest) #t)
|
||||
|
||||
(define (drain-input port)
|
||||
(let loop ((c (read-char)))
|
||||
(if (eq? c #\*eof*) '()
|
||||
(cons c (loop (read-char))))))
|
||||
|
||||
(define (make-string n . fill)
|
||||
(list->string (apply make-list n fill)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue