avoid unnecessary backtracking.
This commit is contained in:
parent
84646ee581
commit
6453cf5ae7
@ -109,7 +109,7 @@ filter(StreamInp, StreamOut, Command) :-
|
|||||||
(
|
(
|
||||||
Line == end_of_file
|
Line == end_of_file
|
||||||
->
|
->
|
||||||
true
|
!
|
||||||
;
|
;
|
||||||
call(Command, Line, NewLine),
|
call(Command, Line, NewLine),
|
||||||
format(StreamOut, '~s~n', [NewLine]),
|
format(StreamOut, '~s~n', [NewLine]),
|
||||||
@ -123,7 +123,7 @@ process(StreamInp, Command) :-
|
|||||||
(
|
(
|
||||||
Line == end_of_file
|
Line == end_of_file
|
||||||
->
|
->
|
||||||
true
|
!
|
||||||
;
|
;
|
||||||
call(Command, Line),
|
call(Command, Line),
|
||||||
fail
|
fail
|
||||||
|
Reference in New Issue
Block a user