This website works better with JavaScript.
Home
Explore
lain.church
Help
Register
Sign In
tA
/
Spiral
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
remembered to filter even numbers
master
Thorn Avery
4 years ago
parent
b071c13cf8
commit
088ff88052
1 changed files
with
5 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-2
spiral.hs
+ 5
- 2
spiral.hs
View File
@@ -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
Write
Preview
Loading…
Cancel
Save