// // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // esskaykay.c -- // // Author : Richard C. Bilson // Created On : Wed May 27 17:56:53 2015 // Last Modified By : Peter A. Buhr // Last Modified On : Wed May 27 18:11:45 2015 // Update Count : 2 // // forall (type A, type B, type C) C ess (C (*f) (A,B), B (*g) (A), A x) { return f(x,g(x)); } forall (type A, type B, type C) C ess (C (*(*f)(A))(B), B (*g)(A), A x) { return f(x)(g(x)); } // forall (type A, type B) A kay (A a, B b) { return a; } forall (type A, type B) A (*kay(A a))(B b); // Now is the following function well-typed, or not? forall (type A) A esskaykay (A x) { ess (kay, kay, x); } // Local Variables: // // tab-width: 4 // // compile-command: "cfa esskaykay.c" // // End: //