1:- module(lambdaki, [ (\)/2, (\)/3, (\)/4, (^)/3, (^)/4, (^)/5 ]). 3
4:- meta_predicate \(1,?), \(2,?,?), \(3,?,?,?). 5:- meta_predicate ^(?,0,?), ^(?,1,?,?), ^(?,2,?,?,?). 6
7:- set_prolog_flag(generate_debug_info, false). 8
9\(M:Hats,A1) :- copy_term(Hats,Copy), call(M:Copy,A1).
10\(M:Hats,A1,A2) :- copy_term(Hats,Copy), call(M:Copy,A1,A2).
11\(M:Hats,A1,A2,A3) :- copy_term(Hats,Copy), call(M:Copy,A1,A2,A3).
12
13^(A1,P,A1) :- call(P).
14^(A1,P,A1,A2) :- call(P,A2).
15^(A1,P,A1,A2,A3) :- call(P,A2,A3)