3 ms·
indeed. Note that's a function declaration in Common Lisp (yours is Scheme): (defun time-to-move (from-pos to-pos) it's like the author didn't understand
by vindarel 1y ago
indeed. Note that's a function declaration in Common Lisp (yours is Scheme):
(defun time-to-move (from-pos to-pos)
it's like the author didn't understand accessors? They don't need the with-accessors. They also might not need with-slots, had they had an accessor for last-duration.
(with-slots (last-duration) antenna
(setf last-duration total-time)
=>
(setf (last-duration antenna) total-time) ;; given last-duration is an accessor: both a getter and a setter.
- tmtvl 1y agoYeah, 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)))
- amszmidt 1y ago(No need for LET*, just LET would suffice.)