Differences
This shows you the differences between two versions of the page.
Both sides previous revision
Previous revision
|
|
en:dydaktyka:intro2ai:labs:lab_prolog3 [2023/01/20 10:16] ikaf |
en:dydaktyka:intro2ai:labs:lab_prolog3 [2023/01/20 10:50] (current) ikaf |
Using the knowledge gained in [[lab_prolog2|the previous lab]], solve the following problems: | Using the knowledge gained in [[lab_prolog2|the previous lab]], solve the following problems: |
| |
- Define a predicate that removes the last 3 elements from a list L, the results is list L1, use the ''list_merge'' predicate. | - Define a predicate that removes the last 3 elements from a list L, the results is list L1, use the ''list_merge'' predicate [[en:dydaktyka:intro2ai:labs:lab_prolog2#merging_lists|from the previous lab]]. |
- Define a predicate that removes the first 3 elements from a list L, the results is list L1, use the ''list_merge'' predicate. | - Define a predicate that removes the first 3 elements from a list L, the results is list L1, use the ''list_merge'' predicate. |
- Define a predicate that removes the first 3 and the last 3 elements from a list L, the results is list L2, use the ''list_merge'' predicate. | - Define a predicate that removes the first 3 and the last 3 elements from a list L, the results is list L2, use the ''list_merge'' predicate. |