Date: Sat, 5 Sep 2009 21:50:24 -0700
   From: Joe Marshall <[email protected]>

   I just pushed a change that restored everything to the way it was.
   I'll try to figure out a way to implement string-head! that is portable.

Why do we need something portable?  What's wrong with this?

(define (string-head! string end)
  (guarantee-string string 'STRING-HEAD!)
  (guarantee-substring-end-index end
                                 (string-maximum-length string)
                                 'STRING-HEAD!)
  (set-string-maximum-length! string end)
  ;; SET-STRING-MAXIMUM-LENGTH! has no effect in some implementations
  ;; of the microcode.  If so, just copy the head.
  (if (fix:= end (string-maximum-length string))
      string
      (%substring string 0 end)))


_______________________________________________
MIT-Scheme-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/mit-scheme-devel

Reply via email to