diff --git a/include/jets/k.h b/include/jets/k.h index 28eec1e8ff..8e176b2a42 100644 --- a/include/jets/k.h +++ b/include/jets/k.h @@ -98,3 +98,13 @@ */ u3_noun u3kf_frog(u3_noun yed); + + /* u3kf_grof(): build %fork span. + */ + u3_noun + u3kf_grof(u3_noun yed); + + /* u3kfu_repo(): + */ + u3_noun + u3kfu_repo(u3_noun, u3_noun); diff --git a/jets/f/fork.c b/jets/f/fork.c index d46c285c2b..bfd32a01b3 100644 --- a/jets/f/fork.c +++ b/jets/f/fork.c @@ -51,6 +51,20 @@ } } + u3_noun + u3qf_grof(u3_noun bez) + { + return u3nc(c3__frog, u3qdi_tap(bez, u3_nul)); + } + u3_noun + u3kf_grof(u3_noun bez) + { + u3_noun ret = u3qf_grof(bez); + + u3z(bez); + return ret; + } + u3_noun u3wf_frog(u3_noun cor) { diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index 3cf7bda615..5b3d46fc42 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -50,6 +50,14 @@ { return _burn_in(van, q_sut, gil); } + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _burn_in(van, fop, gil); + + u3z(fop); + return ret; + } case c3__frog: p_sut = u3t(sut); { return _burn_in(van, u3h(p_sut), gil); diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 15eebd5999..bf7c96d774 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -150,6 +150,14 @@ u3z(foz); return ret; } + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _crop_dext(van, fop, ref, bix); + + u3z(fop); + return ret; + } case c3__frog: p_sut = u3t(sut); { return u3kf_frog(_crop_dext_frog(van, p_sut, ref, bix)); @@ -196,12 +204,12 @@ { return _crop_dext(van, sut, q_ref, bix); } - case c3__fork: u3x_cell(u3t(ref), &p_ref, &q_ref); + case c3__fork: p_ref = u3t(ref); { - u3_noun hin = _crop_dext(van, sut, p_ref, bix); - u3_noun ret = _crop_dext(van, hin, q_ref, bix); + u3_noun gif = u3qfu_repo(van, ref); + u3_noun ret = _crop_dext(van, sut, gif, bix); - u3z(hin); + u3z(gif); return ret; } case c3__frog: p_ref = u3t(ref); diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 477e7d1aa2..2c52eb68c1 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -99,20 +99,13 @@ return _fish_in(van, q_sut, axe, vit); } } - case c3__fork: { - if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { - return u3m_bail(c3__fail); - } - else { - u3_noun hed = _fish_in(van, p_sut, axe, vit); - u3_noun tal = _fish_in(van, q_sut, axe, vit); - u3_noun pro = u3qf_flor(hed, tal); + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _fish_in(van, fop, axe, vit); - u3z(hed); - u3z(tal); - - return pro; - } + u3z(fop); + return ret; } case c3__frog: { p_sut = u3t(sut); diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index df94ed9d8e..5c019ff9d6 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -132,6 +132,14 @@ u3z(vot); return ret; } + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _fuse_in(van, fop, ref, bix); + + u3z(fop); + return ret; + } case c3__frog: p_sut = u3t(sut); { return u3kf_frog(_fuse_in_frog(van, p_sut, ref, bix)); diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index f5a382cdb0..c7f53f9ee3 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -13,10 +13,9 @@ static u3_noun _mint_bean() { - return u3nq(c3__frog, - u3nq(c3__atom, 'f', u3_nul, 0), - u3nq(c3__atom, 'f', u3_nul, 1), - u3_nul); + return u3kf_frog(u3nt(u3nq(c3__atom, 'f', u3_nul, 0), + u3nq(c3__atom, 'f', u3_nul, 1), + u3_nul)); } static u3_noun diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 0d992e7e92..3c790a3beb 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -24,10 +24,9 @@ static u3_noun _mull_bean() { - return u3nq(c3__frog, - u3nq(c3__atom, 'f', u3_nul, 0), - u3nq(c3__atom, 'f', u3_nul, 1), - u3_nul); + return u3kf_frog(u3nt(u3nq(c3__atom, 'f', u3_nul, 0), + u3nq(c3__atom, 'f', u3_nul, 1), + u3_nul)); } static u3_noun diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 8cf1010281..c28cb40d54 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -253,6 +253,14 @@ return _nest_dext(van, q_sut, tel, ref, seg, reg, gil); } } + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _nest_dext(van, fop, tel, ref, seg, reg, gil); + + u3z(fop); + return ret; + } case c3__frog: p_sut = u3t(sut); { if ( c3n == u3du(ref) ) switch ( ref ) { @@ -404,6 +412,14 @@ return _nest_dext(van, sut, tel, q_ref, seg, reg, gil); } } + case c3__fork: p_ref = u3t(ref); + { + u3_noun gif = u3qfu_repo(van, ref); + u3_noun ret = _nest_sint(van, sut, tel, gif, seg, reg, gil); + + u3z(gif); + return ret; + } case c3__frog: { p_ref = u3t(ref); diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index 0ba9c2bb12..b27ac8ea17 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -112,6 +112,14 @@ return _peek_in(van, q_sut, way, axe, gil); } } + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _peek_in(van, fop, way, axe, gil); + + u3z(fop); + return ret; + } case c3__frog: { p_sut = u3t(sut); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 1577961483..dd7eb1275f 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -15,10 +15,9 @@ static u3_noun _play_bean() { - return u3nq(c3__frog, - u3nq(c3__atom, 'f', u3_nul, 0), - u3nq(c3__atom, 'f', u3_nul, 1), - u3_nul); + return u3kf_frog(u3nt(u3nq(c3__atom, 'f', u3_nul, 0), + u3nq(c3__atom, 'f', u3_nul, 1), + u3_nul)); } static u3_noun diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index f10094f676..22da21e971 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -40,6 +40,7 @@ return u3k(q_sut); } } + case c3__fork: return u3qf_grof(u3t(sut)); case c3__hold: { if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_wrap.c b/jets/f/ut_wrap.c index cc7c920088..83f648670c 100644 --- a/jets/f/ut_wrap.c +++ b/jets/f/ut_wrap.c @@ -48,6 +48,14 @@ u3k(rq_sut))); } } + case c3__fork: p_sut = u3t(sut); + { + u3_noun fop = u3qfu_repo(van, sut); + u3_noun ret = _cqfu_wrap(van, fop, yoz); + + u3z(fop); + return ret; + } case c3__frog: p_sut = u3t(sut); { return u3kf_frog(_wrap_frog(van, p_sut, yoz));