Explorar o código

Create a function to list the dividers of a number

DricomDragon %!s(int64=5) %!d(string=hai) anos
pai
achega
2c73d8afb1
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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]
+