Skip to content

Instantly share code, notes, and snippets.

@wtsnjp
Created August 17, 2019 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wtsnjp/5a3bfe56a6278ac1451d73394c1ee2ba to your computer and use it in GitHub Desktop.
Save wtsnjp/5a3bfe56a6278ac1451d73394c1ee2ba to your computer and use it in GitHub Desktop.
\catcode`\@=11
\def\esum#1{\x@esum{\z@}{#1}}
\def\x@hop#1\fi{\fi #1}
\def\x@esum#1#2{%
\ifnum#2<\tw@\number#1\else
\x@hop\expanded{%
\noexpand\x@esum{\the\numexpr #1+#2-\tw@}{\the\numexpr#2-\tw@}%
}\fi}
\esum{90000}\bye
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment