09/06/20 19:44:01
>>251
% Prolog
t251(_文字列,_取り除いた文字列) :-
atom_chars(_文字列,Chars),
t251_1(Chars,L),
atom_chars(_取り除いた文字列,L).
t251_1([],[]) :- !.
t251_1([@|R1],R2) :-
t251_2(R1,R2),!.
t251_1([h,t,t,p,:,/,/|R1],R2) :-
t251_2(R1,R2),!.
t251_1([A|R1],[A|R2]) :-
t251_1(R1,R2).
t251_2([],[]) :- !.
t251_2([A|R1],R2) :-
A @>=' ',
A @=< z,!,
t251_2(R1,R2).
t251_2(L,R2) :-
t251_1(L,R2).