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

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