xref: /original-bsd/old/lisp/fp/fp.1 (revision 403c148d)
1.\" Copyright (c) 1983, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"	@(#)fp.1	6.6 (Berkeley) 07/29/91
7.\"
8.Dd
9.Dt FP 1
10.Os BSD 4.2
11.Sh NAME
12.Nm fp
13.Nd Functional Programming language compiler/interpreter
14.Sh SYNOPSIS
15.Nm fp
16.Sh DESCRIPTION
17.Nm Fp
18is an
19interpreter/compiler that implements the applicative language proposed
20by John Backus.  It is written in
21.Tn FRANZ LISP .
22.Pp
23In a  functional programming language
24intent is expressed
25in  a mathematical style devoid of assignment statements
26and variables.
27Functions compute by value only; there are no side-effects
28since  the result of a computation depends solely on the inputs.
29.Pp
30.Nm Fp
31programs consist of
32.Em functional expressions
33\-
34primitive and user-defined
35.Nm fp
36functions
37combined by
38.Em functional forms .
39These forms take functional arguments
40and return functional results.
41For example, the composition
42operator
43.Sq Ic @
44takes two functional arguments and returns a function
45which represents their composition.
46.Pp
47There exists a single operation in
48.Nm fp
49\&\-
50.Em application .
51This operation causes the system to evaluate the indicated function using
52the single argument
53as input
54(all functions are monadic).
55.Sh GETTING STARTED
56.Pp
57.Nm Fp
58invokes the system.
59.Nm Fp
60compiles functions into
61.Xr lisp  1
62source code;
63.Xr lisp  1
64interprets this code
65(the user may compile this code using the
66.Xr liszt 1
67compiler to gain a factor of 10 in performance).
68.Ic Control D
69exits back to the shell.
70.Ic Break
71terminates any computation in progress  and resets any open file units.
72.Ic )help
73provides a short summary of all user commands.
74.Sh FILES
75.Bl -tag -width liszt -compact
76.It Pa lisp
77The
78.Dv FRANZ LISP
79interpreter.
80.It Pa liszt
81The liszt compiler.
82.El
83.Sh SEE ALSO
84.Xr lisp 1 ,
85.Xr liszt 1 ,
86.Rs
87.%T "The Berkeley FP user's manual"
88.Re
89.Pp
90The language is described  in  the August 1978 issue of
91.Em CACM
92(Turing award lecture by John Backus).
93.Sh BUGS
94If a non-terminating function is applied as the result of loading a file,
95then control is returned to the user immediately, everything
96after that position in the file is ignored.
97.Pp
98.Nm Fp
99incorrectly marks the location of a syntax error on
100large, multi-line function definitions or applications.
101.Sh HISTORY
102The
103.Nm fp
104program appeared in
105.Bx 4.2 .
106