Louis on Nostr: npub1s2kql…p8cla Don't put closing parens on a new line. The convention is to put ...
npub1s2kql4vgtz3ekvh70qsvwc0yykws4cuxtd09ha0z0kx7ufpg0fkqhp8cla (npub1s2k…8cla) 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.
Published at
2023-07-12 17:26:44Event JSON
{
"id": "d561bb664277b994bb453d7edac8d998331ccc1c5052b364b4a1447b68ec7f9f",
"pubkey": "584b9282fbc3d56bde321066766c0ebca3c5508e8d1596a8c7f0a15ca830571c",
"created_at": 1689182804,
"kind": 1,
"tags": [
[
"p",
"82ac0fd58858a39b32fe7820c761e4259d0ae3865b5e5bf5e27d8dee24287a6c",
"wss://relay.mostr.pub"
],
[
"p",
"bf1957ed6b9c28a6ed19f6d4f3b146eeadaee1bbc9d03767b8624f0c09b2d0c5",
"wss://relay.mostr.pub"
],
[
"e",
"38cdda26ab1173c9538a1798bb00da7f2805b5430243c27433a090ae5a73f1a1",
"wss://relay.mostr.pub",
"reply"
],
[
"mostr",
"https://emacs.ch/users/louis/statuses/110702284288576485"
]
],
"content": "nostr:npub1s2kql4vgtz3ekvh70qsvwc0yykws4cuxtd09ha0z0kx7ufpg0fkqhp8cla 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. \n\n(defun max-calories(l max-cal cur-sum)\n (let ((c (first l)))\n (if c\n (if (string-equal c \"\")\n (progn \n (setf max-cal (max cur-sum max-cal))\n (setf cur-sum 0))\n (setf cur-sum (+ cur-sum (parse-integer c))))\n (max-calories (rest l) max-cal cur-sum)\n max-cal)))\n\n\nAlso, I would use FIRST and REST instead of CAR and CDR but that is a matter of taste.",
"sig": "7bd01bcf6505bf86f542dfa0bed2fb0b55f14b8611dd41430edc6c8047b987898bde995521d1c792f280e2eccecd90121668f678f88c350b857121c4e72722d8"
}