summaryrefslogtreecommitdiff
path: root/prolog/problems/lists/count_3/en.py
blob: 9115940a50db964881327437c79594bd35d2057e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# coding=utf-8

id = 120
name = 'count/3'
slug = 'find the number of occurrences of an element in list'

description = '''\
<p><code>count(X, L, N)</code>: <code>N</code> is the number of times the element <code>X</code> appears in the list <code>L</code>.</p>
<pre>
  ?- count(1, [1,2,1,3,1], N).
    N = 3.
</pre>'''

hint = {}