Skip to content

Commit

Permalink
Rename fm to lay
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Dec 8, 2023
1 parent 20e712f commit 63d4504
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/optional.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extension [ValueType](maybe: Optional[ValueType])
def option: Option[ValueType] = if absent then None else Some(vouch(using Unsafe))
def assume(using absentValue: CanThrow[UnsetValueError]): ValueType^{absentValue} = or(throw UnsetValueError())

inline def fm[ValueType2](inline alternative: => ValueType2)(inline fn: ValueType => ValueType2): ValueType2 =
inline def lay[ValueType2](inline alternative: => ValueType2)(inline fn: ValueType => ValueType2): ValueType2 =
if absent then alternative else fn(vouch(using Unsafe))

inline def let[ValueType2](inline fn: ValueType => ValueType2): Optional[ValueType2] =
Expand Down

0 comments on commit 63d4504

Please sign in to comment.