Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Cell C(Noun h, Noun t){ return new Cell(h,t); }
- Atom A(int i){ return new Atom(i); }
- Cell C(int h, Noun t){ return C(A(h),t) }
- Cell C(int h, Noun t){ return C(h,A(t)) }
- Cell C(int h, int t){ return C(A(h),A(t)) }
- Noun expand7(Noun b, Noun C){
- // [7 c 2 [0 1] 0 b]
- // [7 [c [2 [[0 1] [0 b]]]]]
- return C(7, C(c, C(2, C(C(0, 1), C(0, b)))));
- }
- // For bonus points, with perhaps diminishing returns
- Cell C( Noun h, Noun ht, Noun tt ){ return C(h,C(ht,tt)); }
- Cell C( Noun h, Noun ht, Noun tt ){ return C(h,ht,tt) }
- Cell C( Noun h, int ht, Noun tt ){ return C(h,A(ht),tt) }
- Cell C( Noun h, int ht, Noun tt ){ return C(h,ht,A(tt)) }
- Cell C( Noun h, int ht, int tt ){ return C(h,A(ht),A(tt)) }
- Cell C( int h, Noun ht, Noun tt ){ return C(A(h),ht,tt) }
- Cell C( int h, int ht, Noun tt ){ return C(A(h),A(ht),tt) }
- Cell C( int h, int ht, Noun tt ){ return C(A(h),ht,A(tt)) }
- Cell C( int h, int ht, int tt ){ return C(A(h),A(ht),A(tt)) }
- Noun expand7_b(Noun b, Noun C){
- // [7 c 2 [0 1] 0 b]
- // [7 c [2 [0 1] [0 b]]]
- return C(7, c, C(2, C(0, 1), C(0, b)))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement