[make take and drop non-recursive so the loop can be unboxed
John Meacham <john@repetae.net>**20060426215914] hunk ./lib/base/Prelude.hs 682
-take                   :: Int -> [a] -> [a]
-take n _      | n <= 0 =  []
-take _ []              =  []
-take n (x:xs)          =  x : take (n-1) xs
+take :: Int -> [a] -> [a]
+take n xs = f n xs where
+    f n _      | n <= 0 =  []
+    f _ []              =  []
+    f n (x:xs)          =  x : f (n-1) xs
hunk ./lib/base/Prelude.hs 689
-drop                   :: Int -> [a] -> [a]
-drop n xs     | n <= 0 =  xs
-drop _ []              =  []
-drop n (_:xs)          =  drop (n-1) xs
+drop :: Int -> [a] -> [a]
+drop n xs = f n xs where
+    f n xs | n <= 0 =  xs
+    f _ [] = []
+    f n (_:xs) = f (n-1) xs
+