/******************************************************************************/
+
+u32
+pop_list(u32 stack)
+{
+ if (!stack) {
+ error = NOT_ENOUGH_VALUES_ON_STACK;
+ return 0;
+ }
+ u32 list = head(stack);
+ if (TYPE_OF(list) != joyList) {
+ error = NOT_A_LIST;
+ return 0;
+ }
+ return list;
+}
+
+
u32
push_symbol(char *symbol, u32 stack)
{
return cons(JOY_VALUE(joySymbol, ht_insert(symbol)), stack);
}
+
+
u32
push_int(u32 n, u32 stack)
{
return cons(JOY_VALUE(joyInt, n), stack);
}
+
/******************************************************************************/
bool
}
-u32
-pop_list(u32 stack)
-{
- if (!stack) {
- error = NOT_ENOUGH_VALUES_ON_STACK;
- return 0;
- }
- u32 list = head(stack);
- if (TYPE_OF(list) != joyList) {
- error = NOT_A_LIST;
- return 0;
- }
- return list;
-}
-
-
u64
swaack(u32 stack)
{