language: Prolog (swi) (swipl 5.6.64)
date: 128 days 12 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
nalezy( X,[X|_] ).
nalezy( X,[H|T] ) :- nalezy( X,T ).
 
%usun(X,[X|Reszta],Reszta).
%usun(X,[Y|Ogon],[Y|Reszta]) :-
        %usun(X,Ogon,Reszta).
 
sprawdz([H|T]):- nalezy(H,T)->writeln(H).
 
powt(A):- sprawdz(A), writeln(A).
  • upload with new input
  • result: Success     time: 0.02s    memory: 6204 kB     returned value: 0

    Warning: /home/QWf4qj/prog.pl:2:
    	Singleton variables: [H]