diff options
Diffstat (limited to 'ipl/progs/applyfnc.icn')
-rw-r--r-- | ipl/progs/applyfnc.icn | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ipl/progs/applyfnc.icn b/ipl/progs/applyfnc.icn new file mode 100644 index 0000000..22837e9 --- /dev/null +++ b/ipl/progs/applyfnc.icn @@ -0,0 +1,30 @@ +############################################################################ +# +# File: applyfnc.icn +# +# Subject: Program to apply function to lines of a file +# +# Author: Ralph E. Griswold +# +# Date: November 25, 1996 +# +############################################################################ +# +# This file is in the public domain. +# +############################################################################ +# +# This program applies a function specified on the command line to the +# lines of a file. +# +############################################################################ + +procedure main(args) + local func + + func := args[1] | stop("*** no function specified") + + while args[1] := read() do + every write(func ! args) + +end |