Hi, Ralph!

You could make better use of lists in Rebol.

order: join "https://abooks.safeserver.com/cgi-bin/bookord.r?title=" title
order: join order {&author=}
order: join order trim author
order: join order {&isbn=}
order: join order trim isbn
order: join order {&pub=}
order: join order trim pub
order: join order {&price=}
order: join order trim price

This bit about using "order: join" repeatedly is a good clue.
That's one of the great things about rebol list syntax.

order: join copy "" [
 https://abooks.safeserver.com/cgi-bin/bookord.r?title=" title
 {&author=} trim author
 {&isbn=}   trim isbn
 {&pub=}    trim pub
 {&price=}  trim price
]

I didn't actually test it, but it should work, or something very similar to
this.
It's roughly right, for sure, and still easy to read.

Cool, huh?

-galt


Reply via email to