takeFirst function (take first n elements of a list)