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