Please help me! I do not understand SWI-Prolog
From the list L1 to list L2, another element which is equal to the arithmetic average of the next three items in the list L1. If the number of L1 elements are not divisible by 3, then the last item in the list L2 is obtained by dividing by 3 the sum of one or two recent items list L1. List L1 is introduced for prompt screen. As a result, the program should output input L1 and L2 resulting lists.
List items are available under request.