How to break after first if?
let WithdrawalCash (account, amount) = seq {
if ( account.Balance.CurrentAmount - amount < 0.0m) then
yield NotEnoughMoneyForWithdrawal(account, amount)
// How to break here?
let newBalance = account.Balance.CurrentAmount - amount
yield CashWithdrawnEvent(account, newBalance)
}
Not sure this will help, why not use the else clause?
Also have a look at:
Imperative computation in F# (II.) – Writing break and continue