RE: fib.stlc

From: Rui Shi (shearer@cs.bu.edu)
Date: Mon Nov 20 2006 - 12:08:06 EST


Return-Path: <shearer@cs.bu.edu>
X-Spam-HitLevel: 
X-Spam-DCC: INFN-TO: cs3.bu.edu 1233; Body=1 Fuz1=1 Fuz2=1
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on cs3.bu.edu
X-Spam-Level: 
X-Spam-Status: No, score=-4.4 required=10.0 tests=ALL_TRUSTED,AWL,BAYES_00  autolearn=ham version=3.1.0
X-Spam-Pyzor: 
Received: from SHEARERSHOT (cs-dhcp150 [128.197.10.150]) (authenticated bits=0) by cs3.bu.edu (8.13.6/8.13.6) with ESMTP id kAKH87AB014280; Mon, 20 Nov 2006 12:08:17 -0500
Message-Id: <200611201708.kAKH87AB014280@cs3.bu.edu>
From: "Rui Shi" <shearer@cs.bu.edu>
To: <samepst@cs.bu.edu>
Cc: <cs520@cs.bu.edu>
Subject: RE: fib.stlc
Date: Mon, 20 Nov 2006 12:08:06 -0500
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
Thread-Index: AccMvsV9qL779sTCSsCBJbPUX9uOOgAB34rg
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
In-Reply-To: <1395.71.192.166.44.1164039189.squirrel@cs-squirrelmail.bu.edu>
X-Clamav-Status: No
Status: RO
Content-Length: 694
X-UID: 56
X-Keywords:                                                                                                    


Thanks for pointing it out.

-Rui

-----Original Message-----
From: samepst@cs.bu.edu [mailto:samepst@cs.bu.edu]
Sent: Monday, November 20, 2006 11:13 AM
To: cs520@cs.bu.edu
Subject: fib.stlc

The fib.stlc test file is not well typed. Instead of:

let fib =
  lam (n) =>
    (fix (lam (g) => (lam (i) => lam (y) => lam (z) =>
       if n = i then y else g (i+1) z (y + z)) 0 1 1)) in fib (20)

it should be:

let fib =
  lam (n) =>
    ((fix (lam (g) => (lam (i) => lam (y) => lam (z) =>
       if n = i then y else g (i+1) z (y + z)))) 0 1 1) in fib (20)

I spent time thinking it was my typechecker; hopefully this will safeguard
others against the same mistake

Thanks,
Sam Epstein



This archive was generated by hypermail 2b29 : Thu Dec 14 2006 - 16:31:59 EST