Skip to content

Instantly share code, notes, and snippets.

@Risto-Stevcev
Last active September 22, 2022 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Risto-Stevcev/c4644c502ac424f22a74510456ea05b6 to your computer and use it in GitHub Desktop.
Save Risto-Stevcev/c4644c502ac424f22a74510456ea05b6 to your computer and use it in GitHub Desktop.
Some notes on manipulating terms
?- TermStart = (X = 123), with_output_to(string(S), write_term(TermStart, [variable_names(['X'=X])])),
concat(S, ".", S2), open_string(S2, Stream), read_term(Stream, TermEnd, [variable_names(['X'=X])]).
TermStart = TermEnd, TermEnd = (X=123),
S = "X=123",
S2 = 'X=123.',
Stream = <stream>(0x55858662ae00).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment