Did you know ... Search Documentation:
Pack swi_ssardina -- prolog/utils_ssardina.pl
PublicShow source
 downcase_term(+Term:term, -LowerTerm:term) is det
Recursively downcase all atoms in Term, including those nested within lists and dicts. Useful for normalizing identifiers to lowercase atoms in Prolog.
 round(+X:float, -R:float, +N:int) is det
R is X rounded to N decimal places.
 serialize_term(+Term, -JSON) is det
serialize a Prolog term to a JSON-compatible format (numbers, strings, lists, dicts)

?- serialize_term([complex(111,aaa), other(f(1),c), complex(2222,bbb)], T). T = [_{complex:[111, aaa]}, _{other:[_{f:1}, c]}, _{complex:[2222, bbb]}].

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 flatten_dict(Arg1, Arg2)