partition a linked list around a value x