Page 1 of 1

Q 9. Using append/3, write a Prolog query that receives a list, a start index, and a length, and returns the sublist of

Posted: Mon Jun 06, 2022 12:11 pm
by answerhappygod
Q 9 Using Append 3 Write A Prolog Query That Receives A List A Start Index And A Length And Returns The Sublist Of 1
Q 9 Using Append 3 Write A Prolog Query That Receives A List A Start Index And A Length And Returns The Sublist Of 1 (32.03 KiB) Viewed 35 times
Q 9. Using append/3, write a Prolog query that receives a list, a start index, and a length, and returns the sublist of the list. Use zero-based indexing. Examples are given in the following: ?- sublist([1, 2, 3, 4], 1, 2, 0) 0 = [2, 3]. ?- sublist([1, 2, 3, 4], 0, 0, 0) 0 = [] ?- sublist([1, 2, 3, 4], 0, 10, 0) false