<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Yes. Try this:<div><br></div><div><div>(defun foo () (print "Calling foo") 1)</div><div><br></div><div>(let ((x (foo)))</div><div> (defun baz1 () x))</div><div><br></div><div>(defun baz2 ()</div><div> (let ((x (foo)))</div><div> x))</div><div><br></div><div>Then compare what happens when you call BAZ1 and BAZ2.</div><div><br></div></div><div><div>And if you want to take a deep dive, read:</div><div><br></div><div><a href="http://www.flownet.com/ron/specials.pdf">http://www.flownet.com/ron/specials.pdf</a></div><div><br></div><div>rg</div><div><br></div><div><div>On Jun 4, 2009, at 10:49 AM, Neil Baylis wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Maybe this is just a stylistic thing, or maybe something else I don't understand. In the scribble demo, there's a function "label' that just draws the label box inside the window. <div><br></div><div>Why is it defined like this:</div><div><br></div><div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;">(let* ((path (make-instance ns:ns-bezier-path)))</span></div> <div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/moveToPoint: path (ns:make-ns-point 10 10))</span></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/lineToPoint: path (ns:make-ns-point 10 40))</span></div> <div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/lineToPoint: path (ns:make-ns-point 90 40))</span></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/lineToPoint: path (ns:make-ns-point 90 10))</span></div> <div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/lineToPoint: path (ns:make-ns-point 10 10))</span></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (defun label (v)</span></div> <div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/drawAtPoint:withAttributes: #@"Scribble" (ns:make-ns-point 15 15) +null-ptr+)</span></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/stroke path)))</span></div> </div><div><br></div><div><br></div><div>Instead of like this:</div><div><br></div><div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;">(defun label (v)</span></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (let* ((path (make-instance ns:ns-bezier-path))) </span></div> <div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/moveToPoint: path (ns:make-ns-point 10 10))</span></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/lineToPoint: path (ns:make-ns-point 10 40))</span></div> <div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/lineToPoint: path (ns:make-ns-point 90 40))</span></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/lineToPoint: path (ns:make-ns-point 90 10))</span></div> <div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/lineToPoint: path (ns:make-ns-point 10 10))</span></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/fill path)</span></div> <div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/drawAtPoint:withAttributes: #@"Scribble" (ns:make-ns-point 15 15) +null-ptr+)<br></span></div><div><span class="Apple-style-span" style="font-family: 'courier new', monospace;"> (#/stroke path)))</span></div> </div><div><br></div><div><br></div><div>Does putting the defun inside the let do something different than putting the let inside the defun?</div><div><br></div><div>Neil</div> _______________________________________________<br>Openmcl-devel mailing list<br><a href="mailto:Openmcl-devel@clozure.com">Openmcl-devel@clozure.com</a><br>http://clozure.com/mailman/listinfo/openmcl-devel<br></blockquote></div><br></div></body></html>