1

How can one return the factors of an integer in a list? e.g. list_factors(6); > [1,2,3,6]? Is something like this possible? I looked through the documentation but didn't find anything like this tied to "factor" or "prime".

Rax Adaam
  • 790
  • 3
  • 11

1 Answers1

2

I think this is what you want:

listify(divisors(6)); > [1, 2, 3, 6]
Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Eric Blom
  • 36
  • 2