FP(1) UNIX Programmer's Manual FP(1)
fp - Functional Programming language compiler/interpreter
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
_
\bF_
\bp is an interpreter/compiler that implements the applica-
tive language proposed by John Backus. It is written in
F
\bFR
\bRA
\bAN
\bNZ
\bZ L
\bLI
\bIS
\bSP
\bP.
In a functional programming language intent is expressed in
a mathematical style devoid of assignment statements and
variables. Functions compute by value only; there are no
side-effects since the result of a computation depends
_
\bF_
\bp "programs" consist of _
\bf_
\bu_
\bn_
\bc_
\bt_
\bi_
\bo_
\bn_
\ba_
\bl _
\be_
\bx_
\bp_
\br_
\be_
\bs_
\bs_
\bi_
\bo_
\bn_
\bs - primitive
and user-defined _
\bf_
\bp functions combined by _
\bf_
\bu_
\bn_
\bc_
\bt_
\bi_
\bo_
\bn_
\ba_
\bl _
\bf_
\bo_
\br_
\bm_
\bs.
These forms take functional arguments and return functional
results. For example, the composition operator '@' takes
two functional arguments and returns a function which
represents their composition.
There exists a single operation in _
\bf_
\bp - _
\ba_
\bp_
\bp_
\bl_
\bi_
\bc_
\ba_
\bt_
\bi_
\bo_
\bn. This
operation causes the system to evaluate the indicated func-
tion using the single argument as input (all functions are
G
\bGE
\bET
\bTT
\bTI
\bIN
\bNG
\bG S
\bST
\bTA
\bAR
\bRT
\bTE
\bED
\bD
_
\bF_
\bp invokes the system. _
\bF_
\bp compiles functions into _
\bl_
\bi_
\bs_
\bp(1)
source code; _
\bl_
\bi_
\bs_
\bp(1) interprets this code (the user may com-
pile this code using the liszt (1) compiler to gain a factor
of 10 in performance). _
\bC_
\bo_
\bn_
\bt_
\br_
\bo_
\bl _
\bD exits back to the shell.
_
\bB_
\br_
\be_
\ba_
\bk terminates any computation in progress and resets any
open file units. )_
\bh_
\be_
\bl_
\bp provides a short summary of all user
/usr/ucb/lisp the FRANZ LISP interpreter
/usr/ucb/liszt the liszt compiler
/usr/doc/fp the User's Guide
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
_
\bT_
\bh_
\be _
\bB_
\be_
\br_
\bk_
\be_
\bl_
\be_
\by _
\bF_
\bP _
\bu_
\bs_
\be_
\br'_
\bs _
\bm_
\ba_
\bn_
\bu_
\ba_
\bl, available on-line. The
language is described in the August 1978 issue of _
\bC_
\bA_
\bC_
\bM
(Turing award lecture by John Backus).
Printed 7/9/88 April 29, 1985 1
FP(1) UNIX Programmer's Manual FP(1)
If a non-terminating function is applied as the result of
loading a file, then control is returned to the user immedi-
ately, everything after that position in the file is
FP incorrectly marks the location of a syntax error on
large, multi-line function definitions or applications.
Printed 7/9/88 April 29, 1985 2