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

Solutions.P34

Description

Some solutions to Problems.P34 of Ninety-Nine Haskell Problems.

Synopsis

Documentation

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

Calculate Euler's totient function \(\phi(m)\).

Accumulates count of numbers that are coprime.

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

Calculate Euler's totient function \(\phi(m)\).

Filters through numbers that are coprime and count them.