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