Added solution for b using mapcar