09/07/12 06:02:07
>>440
% Prolog (1/2)
t440 :-
get_lines('t440_1.txt',Lines),
構造定義(Lines),
findall(_文,文(_文,[]),_文集),
'20文を選択して表示'(_文集).
'20文を選択して表示'(_文集) :-
length(_文集,Len),
Div is Len // 20,
tell('t440_2.txt'),
for(1,N,20),
Nth is N * Div,
list_nth(Nth,_文集,_選択文),
write_formatted('%t%t%t%t%t\n',[_選択文]),
N = 20,
told.