2014-09-04 07:44:53 +04:00
|
|
|
/* include/f/kjet.h
|
|
|
|
**
|
|
|
|
** This file is in the public domain.
|
|
|
|
*/
|
|
|
|
/** Tier 1.
|
|
|
|
**/
|
2014-11-06 22:13:57 +03:00
|
|
|
u3_noun u3ka_add(u3_noun a, u3_noun b);
|
|
|
|
u3_noun u3ka_sub(u3_noun a, u3_noun b);
|
|
|
|
u3_noun u3ka_mul(u3_noun a, u3_noun b);
|
|
|
|
u3_noun u3ka_gth(u3_noun a, u3_noun b);
|
|
|
|
u3_noun u3ka_lte(u3_noun a, u3_noun b);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
|
|
|
/** Tier 2.
|
|
|
|
**/
|
2014-11-06 22:13:57 +03:00
|
|
|
u3_noun u3kb_lent(u3_noun a);
|
|
|
|
u3_noun u3kb_weld(u3_noun a, u3_noun b);
|
|
|
|
u3_noun u3kb_flop(u3_noun a);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kc: tier 3 functions
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2018-07-13 02:56:56 +03:00
|
|
|
/* u3kc_mix(): binary xor.
|
|
|
|
*/
|
|
|
|
u3_noun
|
|
|
|
u3kc_mix(u3_atom a, u3_atom b);
|
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kc_lsh(): left shift.
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun
|
2014-11-06 22:13:57 +03:00
|
|
|
u3kc_lsh(u3_noun a, u3_noun b, u3_noun c);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kc_rsh(): right shift.
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun
|
2014-11-06 22:13:57 +03:00
|
|
|
u3kc_rsh(u3_noun a, u3_noun b, u3_noun c);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2018-07-13 02:56:56 +03:00
|
|
|
/* u3kc_rep(): assemble single.
|
|
|
|
*/
|
|
|
|
u3_noun
|
|
|
|
u3kc_rep(u3_atom a, u3_noun b);
|
|
|
|
|
|
|
|
/* u3kc_rip(): disassemble.
|
|
|
|
*/
|
|
|
|
u3_noun
|
|
|
|
u3kc_rip(u3_atom a, u3_atom b);
|
|
|
|
|
2018-07-13 02:59:56 +03:00
|
|
|
/* u3kc_rev(): reverse block order, accounting for leading zeroes.
|
|
|
|
*/
|
|
|
|
u3_noun
|
|
|
|
u3kc_rev(u3_atom boz, u3_atom len, u3_atom dat);
|
|
|
|
|
2018-07-13 02:58:32 +03:00
|
|
|
/* u3kc_swp(): reverse block order.
|
|
|
|
*/
|
|
|
|
u3_noun
|
|
|
|
u3kc_swp(u3_atom a, u3_atom b);
|
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kd: tier 4 functions
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kdb_get(): map get for key `b` in map `a` with u3_none.
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_weak
|
2014-11-06 22:13:57 +03:00
|
|
|
u3kdb_get(u3_noun a, u3_noun b);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kdb_got(): map get for key `b` in map `a` with bail.
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun
|
2014-11-06 22:13:57 +03:00
|
|
|
u3kdb_got(u3_noun a, u3_noun b);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kdb_put(): map put for key `b`, value `c` in map `a`.
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_weak
|
2014-11-06 22:13:57 +03:00
|
|
|
u3kdb_put(u3_noun a, u3_noun b, u3_noun c);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kdb_has(): test for get.
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-11-06 06:10:22 +03:00
|
|
|
u3_noun
|
2014-11-06 22:13:57 +03:00
|
|
|
u3kdb_has(u3_noun a, u3_noun b);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kdb_gas(): list to map.
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun
|
2014-11-06 22:13:57 +03:00
|
|
|
u3kdb_gas(u3_noun a, u3_noun b);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kdi_gas(): list to map.
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun
|
2014-11-06 22:13:57 +03:00
|
|
|
u3kdi_gas(u3_noun a, u3_noun b);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kdi_has(): test for presence.
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-11-06 06:10:22 +03:00
|
|
|
u3_noun
|
2014-11-06 22:13:57 +03:00
|
|
|
u3kdi_has(u3_noun a, u3_noun b);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kdi_tap(): map/set convert to list. (solves by_tap also.)
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun
|
2017-09-28 03:40:12 +03:00
|
|
|
u3kdi_tap(u3_noun a);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3kdi_put(): put in set.
|
2014-10-22 00:53:27 +04:00
|
|
|
*/
|
2014-11-06 22:49:41 +03:00
|
|
|
u3_weak
|
|
|
|
u3kdi_put(u3_noun a, u3_noun b);
|
2014-10-22 00:53:27 +04:00
|
|
|
|
2016-01-25 01:05:55 +03:00
|
|
|
/* u3kdi_uni(): set union.
|
|
|
|
*/
|
|
|
|
u3_noun
|
|
|
|
u3kdi_uni(u3_noun a, u3_noun b);
|
|
|
|
|
2017-09-28 03:40:12 +03:00
|
|
|
# define u3kdb_tap(a) u3kdi_tap(a)
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3ke: tier 5 functions
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3ke_cue(): expand saved pill.
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun
|
2014-11-06 22:13:57 +03:00
|
|
|
u3ke_cue(u3_atom a);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2014-11-06 22:13:57 +03:00
|
|
|
/* u3ke_jam(): pack noun as atom.
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_atom
|
2014-11-06 22:13:57 +03:00
|
|
|
u3ke_jam(u3_noun a);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2016-01-11 08:08:03 +03:00
|
|
|
/* u3ke_trip(): atom to tape.
|
2014-09-04 07:44:53 +04:00
|
|
|
*/
|
2014-09-06 00:13:24 +04:00
|
|
|
u3_noun
|
2014-11-06 22:13:57 +03:00
|
|
|
u3ke_trip(u3_noun a);
|
2014-09-04 07:44:53 +04:00
|
|
|
|
2016-01-14 12:52:50 +03:00
|
|
|
/* u3kf_fork(): build %fork span.
|
2016-01-11 08:08:03 +03:00
|
|
|
*/
|
|
|
|
u3_noun
|
2016-01-14 12:52:50 +03:00
|
|
|
u3kf_fork(u3_noun yed);
|
2016-01-11 12:16:38 +03:00
|
|
|
|
2017-09-28 03:40:12 +03:00
|
|
|
/* u3kz_fork(): build %fork span.
|
|
|
|
*/
|
|
|
|
u3_noun
|
|
|
|
u3kz_fork(u3_noun yed);
|
|
|
|
|
2016-01-11 12:16:38 +03:00
|
|
|
/* u3kfu_repo():
|
|
|
|
*/
|
|
|
|
u3_noun
|
|
|
|
u3kfu_repo(u3_noun, u3_noun);
|