cddar function returns first, rest, rest