File: rev_itlist.doc

package info (click to toggle)
hol-light 20170109-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 36,568 kB
  • ctags: 8,549
  • sloc: ml: 540,018; cpp: 439; lisp: 286; java: 279; makefile: 262; sh: 229; yacc: 108; perl: 78; ansic: 57; sed: 39
file content (27 lines) | stat: -rw-r--r-- 447 bytes parent folder | download | duplicates (6)
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
27
\DOC rev_itlist

\TYPE {rev_itlist : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b}

\SYNOPSIS
Applies a binary function between adjacent elements of the reverse of a list.

\KEYWORDS
list.

\DESCRIBE
{rev_itlist f [x1;...;xn] y} returns {f xn ( ... (f x2 (f x1 y))...)}.
It returns {y} if the list is empty.

\FAILURE
Never fails.

\EXAMPLE
{
  # rev_itlist (fun x y -> x * y) [1;2;3;4] 1;;
  val it : int = 24
}

\SEEALSO
itlist, end_itlist.

\ENDDOC