Python from Wise Guy's Viewpoint

prunesquallor at comcast.net prunesquallor at comcast.net
Sat Oct 25 15:07:04 EDT 2003


stephen at dino.dnsalias.com (Stephen J. Bevan) writes:

> There are a few undefined functions in the above (entry-key,
> first-entry, remaining-entries) which means it would not get past most
> static type-checkers.  Assuming that typing programs that have
> undefined functions wasn't part of the test, then using a simple
> association list to represent the table it all type-checks under SML :-

I don't expect type checkers to figure out missing functions.

>   $ cat prune.sml

[code snipped]

>   val lookup = fn : ''a * (''a * 'b) list * ('b -> 'c) * (unit -> 'c) -> 'c
>   val lookupDefault = fn
>     : ''a * (''a * 'b) list * (''a * 'b) list * ('b -> 'c) * (unit -> 'c) -> 'c
>   val transformList = fn
>     : ''a list * (''a * 'b) list * (''a * 'b) list * ('b list -> 'c)
>       * (''a list -> 'c)
>       -> 'c
>   val it = () : unit
>   - 

Cool!





More information about the Python-list mailing list