Skip to content

Commit 06131c6

Browse files
committed
Adding better docs for MapLens#mappingValues
1 parent 04d738d commit 06131c6

File tree

1 file changed

+3
-0
lines changed
  • src/main/java/com/jnape/palatable/lambda/lens/lenses

1 file changed

+3
-0
lines changed

src/main/java/com/jnape/palatable/lambda/lens/lenses/MapLens.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ public static <K, V, V2> Lens.Simple<Map<K, V>, Map<K, V2>> mappingValues(Functi
176176

177177
/**
178178
* A lens that focuses on a map while mapping its values with the mapping {@link Iso}.
179+
* <p>
180+
* Note that for this lens to be lawful, <code>iso</code> must be bijective: that is, every <code>V</code> must
181+
* uniquely and invertibly map to exactly one <code>V2</code>.
179182
*
180183
* @param iso the mapping {@link Iso}
181184
* @param <K> the key type

0 commit comments

Comments
 (0)