fib.stlc

From: samepst@cs.bu.edu
Date: Mon Nov 20 2006 - 11:13:09 EST


Return-Path: <samepst@cs.bu.edu>
X-Spam-HitLevel: 
X-Spam-DCC: : cs3.bu.edu 1113; 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=-3.4 required=10.0 tests=ALL_TRUSTED,AWL,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.0
X-Spam-Pyzor: 
Received: from csa3.bu.edu (csa3 [128.197.12.5]) by cs3.bu.edu (8.13.6/8.13.6) with ESMTP id kAKGDAUR019333 for <cs520@cs.bu.edu>; Mon, 20 Nov 2006 11:13:10 -0500
Received: (from apache@localhost) by csa3.bu.edu (8.13.6/8.12.11/Submit) id kAKGD90W025764; Mon, 20 Nov 2006 11:13:09 -0500
X-Authentication-Warning: csa3.bu.edu: apache set sender to samepst@cs.bu.edu using -f
Received: from 71.192.166.44 (SquirrelMail authenticated user samepst) by cs-squirrelmail.bu.edu with HTTP; Mon, 20 Nov 2006 11:13:09 -0500 (EST)
Message-ID: <1395.71.192.166.44.1164039189.squirrel@cs-squirrelmail.bu.edu>
Date: Mon, 20 Nov 2006 11:13:09 -0500 (EST)
Subject: fib.stlc
From: samepst@cs.bu.edu
To: cs520@cs.bu.edu
User-Agent: SquirrelMail/1.4.6-4.fc2.1.legacy
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
X-Clamav-Status: No
Status: RO
Content-Length: 496
X-UID: 55
X-Keywords:                                                                                                    

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