mapcar written with cons recursively