Skip to content

Commit 179f64c

Browse files
committed
Add modify
1 parent 387b740 commit 179f64c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/Chain/Chain.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ public struct Wrap<Value> {
1515

1616
}
1717

18+
public func modify<Value>(_ value: inout Value, _ modifier: (inout Value) -> Void) {
19+
modifier(&value)
20+
}
21+
1822
extension Wrap {
1923

2024
public func map<U>(_ transform: (Value) throws -> U) rethrows -> U {

0 commit comments

Comments
 (0)