Prolog getting head and tail of string
SWI-Prolog has several different representation of what you might call “strings”. List of character codes (Unicode); List of chars (one-letter atoms); Strings, which are “atomic” objects, and can be manipulated only with the built-in predicates for strings; And finally, of course, atoms. You should read the documentation, but for now, you have at least two … Read more