summaryrefslogtreecommitdiff
path: root/prolog/problems/denotational_semantics/prog_listswap_2/en.py
blob: 89907bdede6c5c3a346413f520ac115079426017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 = {}