less writer slice function