Удалить из строки все пробелы - Prolog
Формулировка задачи:
Помогите пожалуйста
Решение задачи: «Удалить из строки все пробелы»
textual
Листинг программы
predicates
deblanc(string, string)
clauses
deblanc("", "").
deblanc(In, Out) :-
frontchar(In, ' ', InR),
!,
deblanc(InR, Out).
deblanc(In, Out) :-
frontchar(In, Ch, InR),
deblanc(InR, OutR),
frontchar(Out, Ch, OutR).