Created
August 11, 2012 03:01
-
-
Save nyuichi/3320261 to your computer and use it in GitHub Desktop.
delimited continuation in post increment
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
// 後置インクリメントは限定継続を使って表せるし、 | |
// 逆に限定継続の一番身近な例が後置インクリメント | |
// http://www.kmonos.net/pub/Presen/fltv/FLTV.pdf | |
class BigInt { | |
BigInt&/<noreturn> operator++(int) { | |
var f = rest_of_full_expression(); | |
var g = after_full_expression(); | |
var r = f(*this); | |
this->incr(); | |
g(r); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment