--* From postmaster%watson.vnet.ibm.com@yktvmv.watson.ibm.com  Thu Nov  3 17:16:57 1994
--* Received: from yktvmv-ob.watson.ibm.com by asharp.watson.ibm.com (AIX 3.2/UCB 5.64/930311)
--*           id AA19516; Thu, 3 Nov 1994 17:16:57 -0500
--* Received: from watson.vnet.ibm.com by yktvmv.watson.ibm.com (IBM VM SMTP V2R3)
--*    with BSMTP id 7175; Thu, 03 Nov 94 17:17:02 EST
--* Received: from YKTVMV by watson.vnet.ibm.com with "VAGENT.V1.0"
--*           id <A.PETERB.NOTE.YKTVMV.8689.Nov.03.17:17:01.-0500>
--*           for asbugs@watson; Thu, 03 Nov 94 17:17:02 -0500
--* Received: from sun2.nsfnet-relay.ac.uk by watson.ibm.com (IBM VM SMTP V2R3)
--*    with TCP; Thu, 03 Nov 94 17:16:58 EST
--* Via: uk.co.iec; Thu, 3 Nov 1994 19:49:56 +0000
--* From: Peter Broadbery <peterb@num-alg-grp.co.uk>
--* Date: Thu, 3 Nov 94 19:50:49 GMT
--* Message-Id: <6150.9411031950@nags2.nag.co.uk>
--* Received: from co.uk (nags8) by nags2.nag.co.uk (4.1/UK-2.1) id AA06150;
--*           Thu, 3 Nov 94 19:50:49 GMT
--* To: asbugs@watson.ibm.com
--* Subject: [3] segv on nullish program

--@ Fixed  by:  SSD   Wed Nov 23 09:33:31 EST 1994 
--@ Tested by:  none 
--@ Summary:    Not a bug. Bug doesn't appear in v0-37-0 or r1-0-2. 

-- Command line: 'asharp -Q4 ex08.as'
-- Version: 1.0.2
-- Original bug file name: ex08.as

--- Example 8.  Function applied to a generator.

#include "aslib"

import from Integer, Segment Integer, List Integer;

I ==> Integer;

-- (a) Write an infix function '/' which takes a binary function f
--     on integers as its left argument, and a generator g of integers
--     as its right argument, and applies f to the integers given by g.

-- (b) Print the sum of the squares of the numbers from 1 to 100.

-- (c) Use '/' to implement sum and factorial for generators of integers.
 
