def top = { it.size() > 1 ? it[0..-2] : '' } def tail = { it.size() > 1 ? it[1..-1] : '' }