Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
How to make user be able to insert list's element in prologe I'm using Visual Prolog 5.2 Console Application.
Posted
Updated 7-May-12 11:47am

1 solution

As per the documentation:
1.21 (*) Insert an element at a given position into a list.
    Example:
    ?- insert_at(alfa,[a,b,c,d],2,L).
    L = [a,alfa,b,c,d]

Details here: Prolog Lists[^]
More: Prolog list & How to manipulate list[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900