Paste number 22028: loop/initially in clisp

Paste number 22028: loop/initially in clisp
Pasted by: attila
When:3 years, 17 hours ago
Share:Tweet this! | http://paste.lisp.org/+GZW
Channel:#lisp
Paste contents:
Raw Source | XML | Display As

=========== sbcl:

* (let ((string ""))
      (with-output-to-string (escaped)
                             (loop
                                 initially (write-char #\a  escaped)
                               for char across string
                               for code = (char-code char)
                               do
                               (progn)
                               finally (write-char #\b escaped))))
; in: LAMBDA NIL
;     (CHAR-CODE CHAR)
; ==>
;   CHAR
;
; note: deleting unreachable code

; in: LAMBDA NIL
;     (LISP-SPECIAL-CHAR-TO-JS CHAR)
;
; caught STYLE-WARNING:
;   undefined function: LISP-SPECIAL-CHAR-TO-JS

;
; caught STYLE-WARNING:
;   This function is undefined:
;     LISP-SPECIAL-CHAR-TO-JS
;
; compilation unit finished
;   caught 2 STYLE-WARNING conditions
;   printed 1 note

"ab"
*


============= clisp1:

JS> (let ((string ""))
      (with-output-to-string (escaped)
                             (loop
                                 initially (write-char #\a  escaped)
                               for char across string
                               for code = (char-code char)
                               do
                               (progn)
                               finally (write-char #\b escaped))))
"b"
JS> 

============= clisp2, one line deleted:

JS> (let ((string ""))
      (with-output-to-string (escaped)
                             (loop
                                 initially (write-char #\a  escaped)
                               for char across string
                               do
                               (progn)
                               finally (write-char #\b escaped))))
"ab"
JS> 

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.