Expand description
Type-checking builtins: var/1, nonvar/1, atom/1, number/1,
integer/1, float/1, compound/1, is_list/1.
Each deref-tests a single tag. Notable decisions:
integer/1accepts both the immediateTAG_INTand the boxedTAG_BIG(the full i64 range).compound/1is TRUE for lists: aTAG_LSTcounts as compound (compound([1])succeeds).is_list/1walks the tail iteratively and is true only for a proper, nil-terminated list (is_list([a|b])fails).
Functions§
- plg_
rt_ b_ atom_ 1 atom/1: succeeds iff the argument is an atom.- plg_
rt_ b_ compound_ 1 compound/1: a structure OR a list cell (lists count as compound).- plg_
rt_ b_ float_ 1 float/1: a boxed float.- plg_
rt_ b_ integer_ 1 integer/1: immediateTAG_INTor boxedTAG_BIG.- plg_
rt_ b_ is_ list_ 1 is_list/1: a proper (nil-terminated) list. Iterative tail walk so a long list can’t blow the C stack; a partial or improper list fails.- plg_
rt_ b_ nonvar_ 1 nonvar/1: the negation ofvar/1.- plg_
rt_ b_ number_ 1 number/1: any numeric tag (immediate int, boxed big, or float).- plg_
rt_ b_ var_ 1 var/1: succeeds iff the dereferenced argument is an unbound variable.