urbit/include/jets/k.h

97 lines
1.9 KiB
C
Raw Normal View History

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
*/
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
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
2014-11-06 22:13:57 +03:00
u3kdi_tap(u3_noun a, u3_noun b);
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
2014-11-06 22:13:57 +03:00
# define u3kdb_tap(a, b) u3kdi_tap(a, b)
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
2014-11-06 22:13:57 +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