Why Nostr? What is Njump?
2023-07-12 17:26:44
in reply to

Louis on Nostr: npub1s2kql…p8cla Don't put closing parens on a new line. The convention is to put ...

Don't put closing parens on a new line. The convention is to put all closing parent on the end of the last s-exp.

(defun max-calories(l max-cal cur-sum)
(let ((c (first l)))
(if c
(if (string-equal c "")
(progn
(setf max-cal (max cur-sum max-cal))
(setf cur-sum 0))
(setf cur-sum (+ cur-sum (parse-integer c))))
(max-calories (rest l) max-cal cur-sum)
max-cal)))


Also, I would use FIRST and REST instead of CAR and CDR but that is a matter of taste.
Author Public Key
npub1tp9e9qhmc02khh3jzpn8vmqwhj3u25yw352ed2x87zs4e2ps2uwqhadzfn