Last active
August 20, 2018 10:11
-
-
Save maltebucksch/8a912635815f0ac90b6d3d4a0e398efe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// let’s say we have 2 variables | |
b = 1, c = 1 | |
// and a third which is the sum of both | |
a := b + c | |
print(a) // output wil be “2” (so far, so good) | |
// now let’s change the value of “c” | |
c = 2 | |
print(a) | |
// in imperative programming: the output will be “2” (since "a" is not reassigned) | |
// in reactive programming: the output will be “3”! (since "a" is reacting to the change of “c”) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment