"*.txt" { "foo.bar" "foo.factor" } match-pattern
] [ resource-missing? ] must-fail-with
+! match-patterns
+{
+ { "a.txt" "b.pdf" }
+} [
+ { "*.txt" "*.pdf" } { "a.txt" "b.pdf" "a" } match-patterns
+] unit-test
+
! vocab-resource-files
{ { "bar" "bas" "foo" } }
[ "vocabs.metadata.resources.test.1" vocab-resource-files natural-sort ] unit-test
[ resource-missing ] [ nip ] if-empty ;
: match-patterns ( patterns filenames -- filenames' )
- '[ _ match-pattern ] map concat members ;
+ '[ _ match-pattern ] gather ;
: vocab-resource-files ( vocab -- filenames )
[ vocab-resources ] [ vocab-dir-in-root ] bi
: next-articles ( str -- seq )
lookup-article content>> [ array? ] filter
[ first \ $subsections eq? ] filter
- [ rest [ string? ] filter ] map concat members ;
+ [ rest [ string? ] filter ] gather ;
: topic>pdf ( str -- pdf )
[