Created
March 3, 2016 22:12
-
-
Save gaperton/e8704db13dcd9e214154 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function State1( a, b ){ | |
this.a = a; | |
this.b = b; | |
} | |
State1.prototype.msgType1 = function( c, d ){ | |
return new State2( this.a + 1 ); | |
} | |
State1.prototype.msgType2 = function( d ){ | |
return new State1( this.a, d ); | |
} | |
function State2( z ){ | |
this.z = z; | |
} | |
State2.prototype.backMsg = function(){ | |
return new State1( ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Поясните этот код. не совсем понял
Попытка перенести в жс что-то с бекенда ?