Skip to content

skylerto/bank-account

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Bank

A Bank implementation in Haskell.

Proofs

All Lemmas proven using PVS in my Lab5.

Lessons Learned

A Lesson in equality (= vs <-)

There's a very big difference between the following two lines.

b1 <- deposit b1 10
b1 = deposit b1 10

One executes the function then stores it, the other scores the function definition. A similar example in javascript is as follows:

var action = function() { ... }
var equals = action
var monad = action()

The one where you output (return)

To use the <- you need to return a monad. I just so happens that using either the return function or the pure function will allow this to happen. So when defining a function which we'd like to reassign to a value, make sure to use the return function!

License

Copyright © 2016 Skyler Layne

About

Bank Account model implementation in pure Haskell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published