Make DList.partition work with nonepure funcs
merged with 1baa4e and fixed the test. fixes #265