Skip to content

Commit

Permalink
20'
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyicui committed Nov 20, 2010
1 parent d26feed commit afe5f22
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 20.hs
Expand Up @@ -3,3 +3,5 @@ removeAt n (x:xs)
| otherwise = | otherwise =
let (y,ys) = (removeAt (n-1) xs) let (y,ys) = (removeAt (n-1) xs)
in (y,x:ys) in (y,x:ys)

removeAt' n xs = (xs !! (n-1), take (n-1) xs ++ drop n xs)

0 comments on commit afe5f22

Please sign in to comment.