Paste: lambda proposal

Author: kssreeram
Mode: text
Date: Mon, 2 Aug 2010 20:55:57
Plain Text |
in lib-clay:
------------
variant Lambda[In,Out];

[...ArgTypes,Out]
overload call(f:Lambda[(...ArgTypes),Out], ...args:ArgTypes) {
    return forward ...call(*f, ...args);
}

in compiler:
------------
for a lambda/block which has type annotations for all arguments:
  1) infer the return type(s)
  2) declare variant membership:
     instance Lambda[In,Out] = <generated lambda type>;

New Annotation

Summary:
Author:
Mode:
Body: