anchor.diff:            () "Invalid channel mode for put")
     (ach-stream-write (channel-input channel) buffer)
     (force-output (channel-output channel)))
  +
  +
  +;;;;;;;;;;;;;
  +;;; UTILS ;;;
  +;;;;;;;;;;;;;
  +
  +(defgeneric ach-map (result-type function thing))
  +
  +(defmethod ach-map ((result-type (eql nil)) (function function) (thing stream))
  +  (loop
  +     for frame = (ach-stream-read thing)
  +     while frame
  +     do (funcall function frame)))
  +
  +(defmethod ach-map ((result-type (eql 'list)) (function function) (thing stream))
  +  (loop
  +     for frame = (ach-stream-read thing)
  +     while frame
  +     collect (funcall function frame)))
  +
  +(defmethod ach-map (result-type (function function) (thing string))
  +  (with-open-file (file thing
  +                        :direction :input
  +                        :element-type '(unsigned-byte 8))
  +    (ach-map result-type function file)))
  +
   
   ;; ;;;;;;;;;;;;;;;;;;;;;
   ;; ;;; CHILD PROCESS ;;;
  
positive.code:     (force-output s)
      (make-channel :mode mode
                    :synchronous synchronous
                    :transport sock)))
  
  (defun ach-close (channel)
    (socket-close (channel-transport channel)))
  
negative.code: (defpackage :ach
    (:use :cl :binio :usocket)
    (:export :ach-connect :ach-close :ach-read :ach-write
             :ach-next :ach-last :ach-put :ach-map
             :make-listener :make-ach-syncpipe))
  
  (in-package :ach)
  