りさりん! on Nostr: Common Lisper のためにCommon Lisp で階乗計算の関数書くか。 (define ...
Common Lisper のためにCommon Lisp で階乗計算の関数書くか。
(define (factorial n)
(cond ((zero? n) 1) (else (* n (factorial (- n 1)))))
Published at
2023-08-25 16:03:03Event JSON
{
"id": "c4663beec9e509897074b7307e708325203f627ca0743c15b1b0674f24c467be",
"pubkey": "d429bbf80881507c6143678c1e3d0d4c09ad01b17a99af197b166b4161724562",
"created_at": 1692979383,
"kind": 1,
"tags": [
[
"proxy",
"https://mstdn.maud.io/users/risa/statuses/110951096864320949",
"activitypub"
]
],
"content": "Common Lisper のためにCommon Lisp で階乗計算の関数書くか。\n(define (factorial n)\n (cond ((zero? n) 1) (else (* n (factorial (- n 1)))))",
"sig": "11dbf0a2fdd2f10b6044db11e3e40ac3993244d5d2432fd08cbe0fae0923843d0a5b78f113385f436086ebc43ad9ce3cd0ba8503a97269303ebbe856bc8720bb"
}