If I try
Code: Select all
(setf morph (string *curr-w*))
Code: Select all
(string-left-trim "yl" "ylwols")
Code: Select all
(setf morph (string *curr-w*))
Code: Select all
(string-left-trim "yl" "ylwols")
You seem to not understand the concept of source literals. It doesn't use "double quoted words", double quotes are just a syntax for a string source literal. When they encountered by the reader algorithm, which converts the text representation into an in-memory representation, they produce a string. Therefore the concept of "is the word 'slowly' without the quotes" is meaningless, or at least unclear. You might mean symbols, but symbols are not words, and in general their names are human oriented and should rarely be manipulated by the program.laserblue wrote:but it uses double quoted words.E.g. (stem "slowly")
What do you mean by that? A symbol is somewhat complex structure associated with many things, many of which cannot be very meaningfully converted to strings. SYMBOL-NAME can, but as I said it not usually something you should need.laserblue wrote:convert the value of a symbol to a string
STRING-LEFT-TRIM doesn't do what you seem to think it does. In general you don't really seem to know how Common Lisp works at a fairly basic level. Rather that trying to learn a language by randomly changing things I would suggest reading a book like Common Lisp: A Gentle Introduction to Symbolic Computation and/or Practical Common Lisp. There is also Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp, but it is not available for free.laserblue wrote:use (string-left-trim "yl" morph), the value returned is "ylwols" (unchanged) or an error message appears that says *curr-w* or morph is not a sequence
Code: Select all
(string 'walks) => "WALKS"
Code: Select all
(parse '(john walks to the store))