Skip to content

Instantly share code, notes, and snippets.

@zhouqiang-cl
Last active November 24, 2016 06:21
Show Gist options
  • Save zhouqiang-cl/09f6ba4d84e3395b5eef3f97ca37789c to your computer and use it in GitHub Desktop.
Save zhouqiang-cl/09f6ba4d84e3395b5eef3f97ca37789c to your computer and use it in GitHub Desktop.
common lisp 的公约数函数 GCD
语法
gcd &rest integers => greatest-common-denominator
参数和值
integer --- 整数
greatest-common-denominator --- 一个非负整数
描述
获取 integers 的最大公约数
代码
* (gcd 4)
4
* (gcd 423 456)
3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment