Guest User

Untitled

a guest
Jan 22nd, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.38 KB | None | 0 0
  1. insert_on_board(Value, 0, Row, [H | T], [H2 | T]) :-
  2.     insert_on_ine(Value, Row, H, H2).
  3. insert_on_board(Value, Line, Row, [H | T], [H | NewList]) :-
  4.     Line2 is Line - 1,
  5.     insert_on_board(Value, Line2, Row, T, NewList).
  6.  
  7. insert_on_ine(Value, 0, [_ | T], [Value | T]).
  8. insert_on_ine(Value, Row, [H | T], [H | NewList]) :-
  9.     Row2 is Row - 1,
  10.     insert_on_ine(Value, Row2, T, NewList).
Add Comment
Please, Sign In to add comment