Hi, Simon Streit <si...@netpanic.org> skribis:
> Unfortunately while preparing its service, there is this one part that > I'm having trouble trying to get working: > > #$(if interface > #~(for-each (lambda (arg) > (display (string-append "--interface" arg)) > ;; (format #t "--interface ~a " (list->string arg)) > ) > #$(interface)) > '()) > > Which is the main intention for this post: I'd really appreciate a little > hint on how to solve this small problem. Everything else looks okay. My understanding is that you intend the ‘interface’ field to be either #f or a string, is that right? When you write: (interface) that means: “call the procedure bound to ‘interface’, passing it zero arguments”. However, if ‘interface’ is a string, you cannot call it, so you get a wrong-type-to-apply error. Likewise, ‘for-each’ expects its second argument to be a list. But here, ‘interface’ is supposedly a string, not a list, so if you do: (for-each (lambda …) interface) you’ll get a wrong-type-argument error. HTH! Ludo’.