Skip to content

Instantly share code, notes, and snippets.

@KKostya
Created March 2, 2021 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KKostya/db4b6a279424e20ef5d80249414ca012 to your computer and use it in GitHub Desktop.
Save KKostya/db4b6a279424e20ef5d80249414ca012 to your computer and use it in GitHub Desktop.
PierceCPP
#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