Created
March 2, 2021 21:53
-
-
Save KKostya/db4b6a279424e20ef5d80249414ca012 to your computer and use it in GitHub Desktop.
PierceCPP
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
#include <functional> | |
class A {}; | |
class B {}; | |
typedef std::function<B(A)> F; | |
typedef std::function<B(F)> G; | |
typedef std::function<B(G)> H; | |
F proof(H h){ | |
auto t = [](A a){ | |
return [a](F f) { return f (a); }; | |
}; | |
return [h,t](A a){ return h(t(a)); }; | |
} | |
int main(){} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment