LarzBank — A Real Bank, Built in Larzscript
Accounts, deposits, withdrawals, amortized loans and a real double-entry ledger — not a toy example. Watch it explained end to end, then read the source yourself.
What LarzBank actually does
LarzBank is a working command-line bank: it opens accounts backed by real wallet balances, moves money with pay, and refuses an overdraft with a genuine require failure instead of silently letting the balance go negative. On top of that it runs real amortized loans and keeps a double-entry ledger that can be checked for balance at any time.
Every line below is the real output of sh examples/demo.sh against the actual interpreter — re-run fresh for this page, not copied from documentation.
larzscript bin/larzbank.lz open alice 500.00 larzscript bin/larzbank.lz deposit alice 100.00 larzscript bin/larzbank.lz withdraw alice 100000.00 larzscript bin/larzbank.lz withdraw alice 50.00
opened account alice, balance $500.00 alice balance: $600.00 error: RequireError: insufficient funds (line 99) alice balance: $550.00
That RequireError isn't application code catching a bad input and logging it — it's the runtime itself refusing to let the withdrawal happen, the same mechanism the course's error-handling lesson covers.
larzscript bin/larzbank.lz loan-apply alice 1000.00 0.06 12 larzscript bin/larzbank.lz loan-pay alice 1 larzscript bin/larzbank.lz ledger-check
loan #1 opened for alice, disbursed 1000.00 paid installment: $86.07 (loan #1) balanced: true
The loan runs a full 12-row amortization schedule behind the scenes, and ledger-check walks every transaction LarzBank has ever recorded to confirm the books genuinely balance — not an assumption, an actual trial-balance check.
Why it matters
wallet, pay and require are Larzscript's money-native core — the same three keywords the Money-Native Basics lesson introduces. LarzBank is what they look like composed into something a person could actually open and use: open source, real interpreter, no mocked output.