const last = arr => (arr && arr.length ? arr[arr.length - 1] : undefined);