ex5.2 - take (non stack-safe) and drop implementation