pocmatos
2017-2-16 08:25:09

I am sure there’s a function for this but I can’t remember the name. I need a function that will intersperse an element between a list of elements. I have a list of things that I want to display with a space between them.


pocmatos
2017-2-16 08:25:26

I thought the function was actually called intersperse but I can’t find it, so it probably is not.


pocmatos
2017-2-16 08:25:30

Any suggestions?


pocmatos
2017-2-16 08:27:16

The idea was to do something like (printf (apply string-append (intersperse (things->string things) " ")))


lexi.lambda
2017-2-16 08:27:49

@pocmatos: You probably want string-join if your list is of strings, otherwise add-between.


pocmatos
2017-2-16 08:28:06

@lexi.lambda that’s exactly it! thanks


lexi.lambda
2017-2-16 08:28:14

(string-join is basically string-append* combined with add-between.)


pocmatos
2017-2-16 08:28:20

thanks.


pavpanchekha
2017-2-16 22:04:00

Question about the web server that comes in the standard library: is there a way to wrap a servelet to strip a prefix off the URL that is passed to it?


pavpanchekha
2017-2-16 22:04:34

I’d like to run a servlet at a configurable URL yet use dispatch to handle URLs.