s c h e m e w i k i . o r g

/ WebHome / Sandbox.TestTopic1

This Web


WebHome 
WebChanges 
WebTopicList 
WebStatistics 

All Webs


Chicken
Cookbook
Erlang
Know
Main
Plugins
Sandbox
Scm
TWiki  

Schematics


Schematics Home
TWiki Shorthand

Offsite Links


Schemers.org
Lambda the Ultimate
twiki.org
Here's some source code formatted by ScmToXexpr:

(define (for-each-line-in-file filename proc . mode)
  (with-input-from-file
   filename
   (lambda () (apply for-each-line proc (current-input-port) mode))))

(define (for-each-line proc . port+mode)
  (let while ()
    (let ((line (apply read-line port+mode)))
      (unless (eof-object? line)
        (proc line)
        (while)))))

Here's the same using the BeautifierPlugin (ignore spurious %begin% markup, which comes from the source files being used):

BeautifierPlugin Error: Unable to handle "scheme" syntax.

(define (for-each-line-in-file filename proc . mode)
  (with-input-from-file
   filename
   (lambda () (apply for-each-line proc (current-input-port) mode))))

(define (for-each-line proc . port+mode)
  (let while ()
    (let ((line (apply read-line port+mode)))
      (unless (eof-object? line)
        (proc line)
        (while)))))

TestParenting?

-- AntonVanStraaten - 04 Apr 2004

 
 
© 2004 by the contributing authors. / You are Main.guest