diff --git a/vavr/src/main/java/io/vavr/collection/LinkedHashMap.java b/vavr/src/main/java/io/vavr/collection/LinkedHashMap.java index 51cf4bfa3..aba65b6a8 100644 --- a/vavr/src/main/java/io/vavr/collection/LinkedHashMap.java +++ b/vavr/src/main/java/io/vavr/collection/LinkedHashMap.java @@ -956,7 +956,7 @@ public LinkedHashMap tail() { if (isEmpty()) { throw new UnsupportedOperationException("tail of empty LinkedHashMap"); } else { - return LinkedHashMap.ofEntries(list.tail()); + return wrap(list.tail(), map.remove(list.head()._1())); } }