string-join already expects a list of strings, so are you sure you want apply?
Can you give a more specific example?
Perhaps map or some other iteration is what you want?
(for ([strs '(("a" "b") ("c" "D" "E"))])
(displayln (string-join strs " ")))
=>
a b
c D E
On Sat, Oct 29, 2016 at 10:27 AM, <[email protected]> wrote:
> Hi,
>
> ...still improving my shortwave-broadcaster-dumper... :)
>
> I have a list with sublists of strings, which I want to concatenate.
> Each sublist shall form one line of output.
> I tried 'string-append', but this gives me something like this
> (excerpt):
> "189RikisutvarpidRas1+20000-24001234567Icelandic"
> ...the separating #\space is missing.
>
> The according code looks like this (excerpt)
>
> (apply string-append sublist)
>
> then I found 'string-join' which has extra-parameters
> to define separator of all kinds.
>
> ...but...how can I express the 'apply'-instruction...with the
> addional parameters???
>
> This looks something inbetween funny and weird:
>
> (apply string-join sublist " ")
>
> and racket mumbles:
> apply: contract violation
> expected: list?
> given: " "
> argument position: 3rd
> other arguments...:
> #<procedure:string-join>
>
>
> ?
>
> Cheers
> Meino
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.