Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.

Commit 796f922

Browse files
committed
val
1 parent 9f39a57 commit 796f922

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/api.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ bool trySetVal<T>(Out<T> out, T val) {
1414
/// Try change the wrapper box value
1515
/// Can avoid null problems
1616
/// Return whether the setting is successful
17-
bool tryChangeVal<T>(Out<T> out, T fn(T)) {
17+
bool tryChangeVal<T>(Out<T> out, T fn(T val)) {
1818
if (out == null || fn == null) return false;
1919
out.val = fn(out.val);
2020
return true;
2121
}
2222

2323
/// Try use the wrapper box value
24-
Maybe<R> tryUseVal<T, R>(Box<T> box, R fn(T)) {
24+
Maybe<R> tryUseVal<T, R>(Box<T> box, R fn(T val)) {
2525
if (box == null || fn == null) return None<R>();
2626
return Some<R>(fn(box.val));
2727
}

0 commit comments

Comments
 (0)