fix #3: produce empty object or empty array as appropriate when deleting only element
avoid redundant pattern matching
Merge pull request #4 from atl-ecosystem/issue-3

fix #3: produce empty object or empty array as appropriate when deleting only element