Skip to content

Lesson 14 is too big a step #11

Open
@MichielNass

Description

@MichielNass

Hi, just wanted to let you know that the book was good until lesson 14.
I was happy with my progress, now I am considering a book burning, lesson 14 is way too big a leap!

I had to cheat, aka going here and coping code to get it to work and now I do not understand it...

The problem is this part:
/// Runs some account operation such as withdraw or deposit with auditing.
let auditAs operationName audit operation amount account =
audit account (sprintf "%O: Performing a %s operation for £%M..." DateTime.UtcNow operationName amount)
let updatedAccount = operation amount account

let accountIsUnchanged = (updatedAccount = account)

if accountIsUnchanged then audit account (sprintf "%O: Transaction rejected!" DateTime.UtcNow) 
else audit account (sprintf "%O: Transaction accepted! Balance is now £%M." DateTime.UtcNow updatedAccount.Balance)

updatedAccount

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions