| Copyright | Copyright (C) 2021 Yoo Chung |
|---|---|
| License | GPL-3.0-or-later |
| Maintainer | dev@chungyc.org |
| Safe Haskell | Safe-Inferred |
| Language | GHC2021 |
Problems.P35
Description
Part of Ninety-Nine Haskell Problems. Some solutions are in Solutions.P35.
Synopsis
- primeFactors :: Integral a => a -> [a]
Documentation
primeFactors :: Integral a => a -> [a] Source #
Determine the prime factors of a given positive integer. Construct a list containing the prime factors in ascending order.
Examples
>>>primeFactors 315[3,3,5,7]