Advertisement
tanjeel

Square in Prolog

Apr 24th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.07 KB | None | 0 0
  1. square([],[]).
  2. square([X|T],[s(X,Y)|L]):-Y is X*X,square(T,L).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement