Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, the total run-scan function could be fairly short:

  (defun run-scan (antenna scan)
    "Perform a scan on this antenna. Return a scan log."
    (let* ((slew-time (move-to antenna (scan-position scan)))
           (on-source-time (delay antenna (scan-length scan))))
      (setf (antenna-last-duration antenna) (+ on-source-time slew-time))
      (make-scan-log scan slew-time on-source-time)))


(No need for LET*, just LET would suffice.)


LET* may be needed if the operations are time-dependent (so if the move-to operation must happen before the delay operation), as LET does the binding in parallel (at least, according to the spec).


That is a very acute observation!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: