Skip to content

Commit 5176726

Browse files
Fixed readme
1 parent e418657 commit 5176726

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,19 @@ pub fn Impl(comptime T: type, comptime Ifc: fn (type) type) type { ... }
1616
The function `Ifc` must always return a struct type. If `Unwrap(T)`
1717
has a declaration matching the name of a field from
1818
`Ifc(T)` that cannot coerce to the type of the field, then a
19-
compile error will occur[^1].
19+
compile error will occur.
20+
21+
### Unwrap
22+
23+
The internal `Unwrap` function removes all layers of `*`, `?`, or `!`
24+
wrapping a type, e.g. `Unwrap(!?*u32)` is `u32`.
2025

2126
## Return value
2227

2328
The type `Impl(T, Ifc)` is a struct type with the same fields
2429
as `Ifc(T)`, but with the default value of each field set equal to
2530
the declaration of `Unwrap(T)` of the same name, if such a declaration
26-
exists[^1].
31+
exists.
2732

2833
## Example
2934

@@ -109,6 +114,3 @@ More in-depth [examples][4] are provided.
109114
[2]: https://en.wikipedia.org/wiki/Static_dispatch
110115
[3]: https://github.com/permutationlock/zimpl/blob/main/why.md
111116
[4]: https://github.com/permutationlock/zimpl/blob/main/examples
112-
113-
[^1]: The internal `Unwrap` function removes all layers of `*`, `?`, or `!`
114-
wrapping a type, e.g. `Unwrap(!?*u32)` is `u32`.

0 commit comments

Comments
 (0)