File: index.doc

package info (click to toggle)
hol88 2.02.19940316-8
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 63,120 kB
  • ctags: 19,367
  • sloc: ml: 199,939; ansic: 9,300; sh: 7,118; makefile: 6,074; lisp: 2,747; yacc: 894; sed: 201; cpp: 87; awk: 5
file content (26 lines) | stat: -rw-r--r-- 405 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
\DOC index

\TYPE {index : ((* -> bool) -> * list -> int)}

\SYNOPSIS
Find the position of an element in a list.

\LIBRARY window

\DESCRIBE
{index p l} finds the position of the first occurrence of an element in the 
list {l} satisfying the predicate {p}.

\FAILURE
{index p l} fails if no element of {l} satisfies p.

\EXAMPLE
{
   # position (\e. e = 2) [1; 2; 3];;
   2 : int 
}

\SEEALSO
el

\ENDDOC