summaryrefslogtreecommitdiff
path: root/prolog/problems/sets/count_3/en.py
blob: 481fd1c0bd72ebcbf1bbbbc61776c8ceaf51a0bd (plain)
1
2
3
4
5
6
7
8
9
10
11
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 = {}