the list:
Code Select
one
two
three
what I am trying to construct is this:
Code Select
<li><a href="/one">one</a></li>
<li><a href="/two">two</a></li>
<li><a href="/three">three</a></li>
what i am trying is this:
Code Select
(set 'l (read-file "./list"))
(parse l)
(replace $it l "<li><a href="http://xyz.com/$it">$it</a></li>")
(println l)
however, i am getting the error:
Code Select
ERR: string expected in function replace
the manual entry for the replace function says:
syntax: (replace exp-key list exp-replacement [func-compare])
i thought $it is the exp-key, l is the list, and the exp-replacement to be:
Code Select
"<li><a href="http://xyz.com/$it">$it</a></li>"
am i correct to guess that replace is the correct function to do this?
thanks very much!