packages feed

code-conjure-0.3.6: bench/take-drop.out

drop :: Int -> [A] -> [A]
-- testing 60 combinations of argument values
-- looking through 1 candidates of size 1
-- looking through 1 candidates of size 2
-- looking through 1 candidates of size 3
-- looking through 1 candidates of size 4
-- looking through 1 candidates of size 5
-- looking through 1 candidates of size 6
-- looking through 1 candidates of size 7
-- looking through 7 candidates of size 8
-- looking through 35 candidates of size 9
-- looking through 109 candidates of size 10
-- looking through 261 candidates of size 11
-- looking through 567 candidates of size 12
-- looking through 1183 candidates of size 13
drop x xs  =  if null xs || x == 0 then xs else drop (dec x) (tail xs)

take :: Int -> [A] -> [A]
-- testing 60 combinations of argument values
-- looking through 2 candidates of size 1
-- looking through 2 candidates of size 2
-- looking through 2 candidates of size 3
-- looking through 6 candidates of size 4
-- looking through 10 candidates of size 5
-- looking through 14 candidates of size 6
-- looking through 26 candidates of size 7
-- looking through 62 candidates of size 8
-- looking through 182 candidates of size 9
-- looking through 498 candidates of size 10
-- looking through 1270 candidates of size 11
-- looking through 3346 candidates of size 12
-- looking through 8650 candidates of size 13
-- looking through 21270 candidates of size 14
-- looking through 51166 candidates of size 15
-- looking through 121430 candidates of size 16
take x xs  =  if null xs || x == 0 then [] else head xs:take (dec x) (tail xs)