packages feed

code-conjure-0.3.4: 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 33 candidates of size 9
-- looking through 100 candidates of size 10
-- looking through 236 candidates of size 11
-- looking through 510 candidates of size 12
-- looking through 1069 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 176 candidates of size 9
-- looking through 470 candidates of size 10
-- looking through 1190 candidates of size 11
-- looking through 3116 candidates of size 12
-- looking through 8020 candidates of size 13
-- looking through 19658 candidates of size 14
-- looking through 46906 candidates of size 15
-- looking through 109976 candidates of size 16
take x xs  =  if null xs || x == 0 then [] else head xs:take (dec x) (tail xs)