Skip to content

Commit b21bcd5

Browse files
committed
Added default parameter values to IMaybe implementations
- while strictly speaking not necessary, they make it more clear to read
1 parent f2cd62f commit b21bcd5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MaybeSharp/Maybe.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public IMaybe<TResult> Bind<TResult>(Func<T, IMaybe<TResult>> just) where TResul
6464
return just(_value);
6565
}
6666

67-
public IMaybe<T> Default(Func<IMaybe<T>> defaultValue)
67+
public IMaybe<T> Default(Func<IMaybe<T>> defaultValue = null)
6868
{
6969
return this;
7070
}
@@ -111,7 +111,7 @@ public IMaybe<TResult> Bind<TResult>(Func<T, IMaybe<TResult>> just) where TResul
111111
return Nothing<TResult>();
112112
}
113113

114-
public IMaybe<T> Default(Func<IMaybe<T>> defaultValue)
114+
public IMaybe<T> Default(Func<IMaybe<T>> defaultValue = null)
115115
{
116116
return defaultValue();
117117
}

0 commit comments

Comments
 (0)