Rename haskell seminar

main
Aleksey Zubakov 2 years ago
parent 8382832f42
commit e8c503d7b6
  1. 0
      07_haskell/Main.hs
  2. 11
      07_haskell/Second.hs

@ -20,8 +20,15 @@ len' :: [a] -> Integer
len' xs = helper 0 xs
inv :: [a] -> [a]
inv _ = _
inv :: [a] -> [a] -> [a]
inv acc (x:xs) = inv (x : acc) xs
inv acc [] = acc
rev :: [a] -> [a]
rev xs = inv [] xs
-- 1 : 2 : 3 : []
-- 3 : 2 : 1 : []
getF :: Name -> Maybe Name
Loading…
Cancel
Save