Skip to content

Instantly share code, notes, and snippets.

View federkasten's full-sized avatar
😈
hacking the world

Takashi AOKI federkasten

😈
hacking the world
View GitHub Profile

Keybase proof

I hereby claim:

  • I am federkasten on github.
  • I am taksh (https://keybase.io/taksh) on keybase.
  • I have a public key ASA02I_qy-9YceGDEcmvKM22W1JW-vnmEMjdoK_9v696-go

To claim this, I am signing this object:

(declare expect-memo)
(defn expect*
[n t]
(if (zero? t)
n
(let [nn (inc n)
ps (/ 1 nn)
pf (- 1 ps)
es (* ps (expect-memo nn (dec t)))