Skip to content

Commit

Permalink
More examples
Browse files Browse the repository at this point in the history
  • Loading branch information
taig committed Sep 26, 2023
1 parent a0327aa commit 3d3552c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# enumeration ext

> Derive enumeration values and codecs
> Derive enumeration values and codecs for enums and nested sealed class/trait hierarchies
## Installation

Expand Down Expand Up @@ -33,6 +33,9 @@ given mapping: Mapping[Animal, String] = Mapping.enumeration:
mapping.values
// > List(Bird, Cat, Dog)

mapping.values.map(mapping.inj)
// > List(bird, cat, dog)

mapping.inj(Animal.Dog)
// > "dog"

Expand Down

0 comments on commit 3d3552c

Please sign in to comment.