summaryrefslogtreecommitdiff
path: root/ipl/progs/applyfnc.icn
blob: 22837e9b159eaada1e603481b865297af4da1d65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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