Assignment versus binding

Gregory Ewing greg.ewing at canterbury.ac.nz
Wed Oct 5 02:07:52 EDT 2016


Chris Angelico wrote:
> So what
> happens if you have a monad "print to the console" in place of Steve's
> time.sleep example? Will you get one execution of it or two?

Again, you wouldn't be able to write it that way in Haskell.

The things you *would* be able to write would all have the
property that, if there are two print operations being
done, they are either done by two different expressions or
by an expression being evaluated in two different
environments.

-- 
Greg



More information about the Python-list mailing list