21#include "serene/rt/core/values.h"
43 return ((v & TAG_PRIM_MASK) == TAG_PAIR);
47 return ((v & TAG_PRIM_MASK) == TAG_LIST);
srn_value_t srn_make_list(srn_context_t *ctx)
Create a new list and empty list.
static bool srn_is_pair(srn_value_t v)
srn_value_t srn_make_pair(srn_context_t *ctx, srn_src_location_t *loc, srn_value_t left, srn_value_t right)
Create a new pair of values in the given context ctx.
static bool srn_is_list(srn_value_t v)
srn_value_t srn_conj_list(srn_context_t *ctx, srn_src_location_t *loc, srn_list_t *head, srn_value_t v)
Add the given value v to the front of the list and returns the new list.
Since all the values are immutable and persistent.