xref: /original-bsd/old/lisp/fp/fp.1 (revision b079d642)
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.4 (Berkeley) 06/26/90
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.Em 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
31.Em programs
32consist of
33.Em functional expressions
34\-
35primitive and user-defined
36.Nm fp
37functions
38combined by
39.Em functional forms .
40These forms take functional arguments
41and return functional results.
42For example, the composition
43operator
44.Sq Ic @
45takes two functional arguments and returns a function
46which represents their composition.
47.Pp
48There exists a single operation in
49.Nm fp
50\&\-
51.Em application .
52This operation causes the system to evaluate the indicated function using
53the single argument
54as input
55(all functions are monadic).
56.Sh GETTING STARTED
57.Pp
58.Nm Fp
59invokes the system.
60.Nm Fp
61compiles functions into
62.Xr lisp  1
63source code;
64.Xr lisp  1
65interprets this code
66(the user may compile this code using the
67.Xr liszt 1
68compiler to gain a factor of 10 in performance).
69.Ic Control D
70exits back to the shell.
71.Ic Break
72terminates any computation in progress  and resets any open file units.
73.Ic )help
74provides a short summary of all user commands.
75.Sh FILES
76.Dw liszt
77.Di L
78.Dp Pa lisp
79the FRANZ LISP interpreter
80.Dp Pa liszt
81the liszt compiler
82.\" .Dp Pa /usr/doc/fp
83.\" the User's Guide
84.Dp
85.Sh SEE ALSO
86.Xr lisp 1 ,
87.Xr liszt 1 ,
88.br
89.Em The Berkeley FP user's manual ,
90available on-line.
91The language is described  in  the August 1978 issue of
92.Em CACM
93(Turing award lecture by John Backus).
94.Sh BUGS
95If a non-terminating function is applied as the result of loading a file,
96then control is returned to the user immediately, everything
97after that position in the file is ignored.
98.Pp
99.Nm Fp
100incorrectly marks the location of a syntax error on
101large, multi-line function definitions or applications.
102.Sh HISTORY
103.Nm Fp
104appeared in 4.2 BSD.
105.Sh AUTHOR
106Scott B. Baden
107