Explorar el Código

remembered to filter even numbers

master
Thorn Avery hace 4 años
padre
commit
088ff88052
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. +5
    -2
      spiral.hs

+ 5
- 2
spiral.hs Ver fichero

@@ -54,5 +54,8 @@ main = do
(words args)

aura :: String -> Bool
aura s = foldr (&&) True
(map (`elem` ['0'..'9']) s)
aura s = if (foldr (&&) True (map (`elem` ['0'..'9']) s))
then ((mod rs 2) == 1)
else False
where
rs = (read s)::Int

Cargando…
Cancelar
Guardar