]> Repositorios git - scryer-prolog.git/commitdiff
use newly available character type in must_be/2
authorMarkus Triska <[email protected]>
Sat, 11 Jul 2020 17:52:01 +0000 (19:52 +0200)
committerMarkus Triska <[email protected]>
Sat, 11 Jul 2020 19:00:25 +0000 (21:00 +0200)
src/lib/files.pl

index 3d219173ff7bee32c6222d94fd717ed8de9d1c33..b53b9bbb29d69367c1a33d4acc71d8c3c7554e37 100644 (file)
 
 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),