Click here to Skip to main content
13,052,696 members (65,632 online)
Rate this:
Please Sign up or sign in to vote.
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 7-May-12 10:47am
Updated 7-May-12 11:47am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

As per the documentation:
1.21 (*) Insert an element at a given position into a list.
    ?- 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[^]

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 8 May 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100