[nem-bug] [Nemerle 0000552]: More type inference needed in nested
local function
feedback at nemerle.org
feedback at nemerle.org
Mon Oct 24 00:24:10 CEST 2005
The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=552>
======================================================================
Reported By: nazgul
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 552
Category: Compiler
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 10-24-2005 00:24 CEST
Last Modified: 10-24-2005 00:24 CEST
======================================================================
Summary: More type inference needed in nested local function
Description:
using Nemerle;
def quick (xs )
{
def quicker (xs, ys)
{
| ([],_ )=> ys
| ([x],_) => x::ys
| (a::bs,_) => def part(left, right, x)
{
| (l,r, []) => quicker (l, a::quicker(r, ys))
| (l,r, x::xs) => if (x<a) part(x::l, r, xs) else part (l,x::r,xs)
}
part([],[],bs)
}
quicker (xs, [])
}
def pr(xs)
{
| [] => IO.printf("\n");
| x::xs => IO.printf("%i",x); pr(xs);
}
pr(quick([1,8,2,3,4,7]));
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
10-24-05 00:24 nazgul New Issue
======================================================================
More information about the bugs
mailing list