Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Bank Account prerequisites/practices #585

Merged
merged 1 commit into from
Oct 13, 2023
Merged

Conversation

bobbicodes
Copy link
Member

Fixes #550.

Prerequisites for Bank Account changed to "conditionals" and "numbers", which matches what other tracks have selected for this exercise.

Even that might be overkill, because the Clojure solution actually requires neither of those...

For reference, here is the example solution:

(defn open-account []
  (atom 0))

(defn close-account [acct]
  (reset! acct nil))

(defn get-balance [acct]
  @acct)

(defn update-balance [account amount]
  (swap! account + amount))

Still, I think it's probably appropriate to have some prerequisites to prevent the student from encountering this exercise too early, before they would reasonably be introduced to atoms, which don't yet have a concept exercise. In any case, this is an improvement because the exercise definitely has nothing to do with floating point.

@bobbicodes bobbicodes merged commit e2494a4 into main Oct 13, 2023
3 checks passed
@bobbicodes bobbicodes deleted the bobbicodes-patch-2 branch October 13, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bank Account problem under wrong concept?
1 participant