Browse Source

Create a function to list the dividers of a number

DricomDragon 5 years ago
parent
commit
2c73d8afb1
1 changed files with 4 additions and 0 deletions
  1. 4 0
      prime.hs

+ 4 - 0
prime.hs

@@ -0,0 +1,4 @@
+-- Exercice from slide 42/82
+
+dividers n = [k | k <- [2..(n-1)], rem n k == 0]
+