Hi! Liliana Marie Prikler <liliana.prik...@gmail.com> skribis:
> (define* (search-input-file* inputs predicate > #:key (hint "<unknown>")) > "Find the first file in INPUTS matching PREDICATE. The return value > of PREDICATE is returned as-is, so patterns like > (search-input-file* inputs > (lambda (parent) > (and (file-exists? (string-append parent \"/lib/foobar.so\")) > (string-append parent \"/lib\")))) > work as expected. > > When PREDICATE returns no match, raise a search error using HINT for a > file name." This would be equivalent to: (dirname (search-input-file inputs "/lib/libfoo.so")) right? Another option would be a procedure that does precisely that: return the parent. Thoughts? Ludo’.