Click here to Skip to main content
11,639,765 members (64,625 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: logic
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
Edited 7-May-12 11:47am

1 solution

Rate this: bad
good
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.
    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[^]
  Permalink  

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

  Print Answers RSS
0 Suvendu Shekhar Giri 330
1 CPallini 177
2 F-ES Sitecore 170
3 himanshu agarwal 167
4 Sergey Alexandrovich Kryukov 159
0 OriginalGriff 9,081
1 Sergey Alexandrovich Kryukov 8,847
2 Mika Wendelius 7,027
3 Suvendu Shekhar Giri 2,650
4 F-ES Sitecore 2,558


Advertise | Privacy | Mobile
Web04 | 2.8.150731.1 | Last Updated 8 May 2012
Copyright © CodeProject, 1999-2015
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