Logo 
Search:

Artificial Intelligence Articles

Submit Article
Home » Articles » Artificial Intelligence » ProLogRSS Feeds

Prolog program to concatenate two lists giving third list

Posted By: Milind Mishra     Category: Artificial Intelligence     Views: 8078

Prolog program to concatenate two lists giving third list.

Code for Prolog program to concatenate two lists giving third list in Artificial Intelligence

domains

    list=symbol*

    
predicates

    con(list,list,list)

    
clauses

    con([],L1,L1).
    
    con([X|Tail],L2,[X|Tail1]):-
        con(Tail,L2,Tail1).


OUT PUT
=======

Goal: con([a,b,c],[d,e],ConcatList)

ConcatList=["a","b","c","d","e"]

1 Solution
  
Share: 


Didn't find what you were looking for? Find more on Prolog program to concatenate two lists giving third list Or get search suggestion and latest updates.

Milind Mishra
Milind Mishra author of Prolog program to concatenate two lists giving third list is from India.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!