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.P36

Description

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

Synopsis

Documentation

primeFactorsMultiplicity :: Integral a => a -> [(a, a)] Source #

Determine the prime factors of a given positive integer. Construct a list containing the prime factors and their multiplicity.

Examples

>>> primeFactorsMultiplicity 315
[(3,2),(5,1),(7,1)]