Anonymous user
Lucky and even lucky numbers: Difference between revisions
→{{header|Haskell}}: corrected range function and simplified nth and interval functions
m (→{{header|Haskell}}: typos introduced in last change) |
(→{{header|Haskell}}: corrected range function and simplified nth and interval functions) |
||
Line 135:
nth :: Int -> Lucky -> Int
nth j l = case l of
Lucky
EvenLucky ->
range :: Int -> Int -> Lucky -> [Int]
range x x2 l = case l of
Lucky
EvenLucky -> drop (
interval :: Int -> Int -> Lucky -> [Int]
interval x x2 l = let x'' = (-1 * x2) in
case l of
Lucky
EvenLucky ->
lucky :: [String] -> Lucky
|