ninetynine-1.3.0: Ninety-Nine Haskell Problems
CopyrightCopyright (C) 2021 Yoo Chung
LicenseGPL-3.0-or-later
Maintainerdev@chungyc.org
Safe HaskellSafe-Inferred
LanguageGHC2021

Problems.P32

Description

Part of Ninety-Nine Haskell Problems. Some solutions are in Solutions.P32.

Synopsis

Documentation

myGCD :: Integral a => a -> a -> a Source #

Determine the greatest common divisor of two positive integer numbers. Use Euclid's algorithm.

Examples

>>> myGCD 36 63
9
>>> myGCD 125 81
1
>>> myGCD 221 559
13