summaryrefslogtreecommitdiff
path: root/prolog/problems/denotational_semantics/prog_listswap_2/en.py
blob: 0f8e0388ea0ff35cfbd60aeb6a128fef22adf7f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# coding=utf-8

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 = {}