blob: 2cf8fff3855a8f48e249e8a7b42a66346e9563b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# coding=utf-8
id = 175
name = 'prog_listswap/2'
slug = 'list-manipulation language'
description = '''\
<p>Write a DCG for manipulating list elements. The first symbol in every word is <code>[begin]</code>, followed by any sequence of "instruction" symbols from the set {<code>left</code>, <code>right</code>, <code>swap</code>}, and finally <code>[end]</code>. The starting symbol should be named <code>prog_listswap</code>.</p>
<p>Example words: <code>[begin,right,swap,end]</code>, <code>[begin,right,left,end]</code>.</p>
'''
hint = {}
|