From 0fa8feb4753338aba895a17b76f2fddee8ef6493 Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Sat, 11 Jul 2020 19:52:01 +0200 Subject: [PATCH] use newly available character type in must_be/2 --- src/lib/files.pl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/lib/files.pl b/src/lib/files.pl index 3d219173..b53b9bbb 100644 --- a/src/lib/files.pl +++ b/src/lib/files.pl @@ -57,13 +57,7 @@ list_of_chars(Cs) :- must_be(list, Cs), - ( ground(Cs) -> - ( member(C, Cs), \+ atom_length(C, 1) -> - type_error(char, C, files_and_directories) - ; true - ) - ; instantiation_error(s) - ). + maplist(must_be(character), Cs). directory_files(Directory, Files) :- list_of_chars(Directory), -- 2.54.0