人気ブログランキング | 話題のタグを見る

Prelude の標準関数 - g -

gcd :: Integral a => a -> a -> a
動作:2数の最大公約数を求める。
用例:
Prelude> gcd 2 10
2
Prelude> gcd (-7) 13
1
by tnomura9 | 2009-08-23 20:48 | Haskell | Comments(0)
<< Prelude の標準関数 -... Prelude の標準関数 -... >>