Programming language : Prolog
Not allowed to use pre-defined predicates!
![Code a predicate shuffle/3 that shffles the two given lists into a third, i.e., interleaves them in some way: the resulting list contains all elements of both given lists and only those, in their order of appearance in the given lists, but interleaved arbitrarily. The predicate must be able to accept and generate all valid outcomes of shuffling 2- shuffle([1,2,3,4], [a,b,c], [1 ,a , b ,2 , 3 , c ,4] ). true ?- shuffle([1], [a,b],Zs). false (The order in which answers are generated is not important.)](https://d2vlcm61l7u1fs.cloudfront.net/media%2F2da%2F2da218b7-5248-4804-bbfe-1e5773b037fa%2FphpuF5ZaO.png)
Code a
PayPal Gateway not configured
PayPal Gateway not configured
Programming language : Prolog
Not allowed to use pre-defined predicates!
![Code a predicate shuffle/3 that shffles the two given lists into a third, i.e., interleaves them in some way: the resulting list contains all elements of both given lists and only those, in their order of appearance in the given lists, but interleaved arbitrarily. The predicate must be able to accept and generate all valid outcomes of shuffling 2- shuffle([1,2,3,4], [a,b,c], [1 ,a , b ,2 , 3 , c ,4] ). true ?- shuffle([1], [a,b],Zs). false (The order in which answers are generated is not important.)](https://d2vlcm61l7u1fs.cloudfront.net/media%2F2da%2F2da218b7-5248-4804-bbfe-1e5773b037fa%2FphpuF5ZaO.png)
Code a
PayPal Gateway not configured
PayPal Gateway not configured