Hey, On Wed, 1 Dec 2004 09:33:27 -0500, Matt Fowles <[EMAIL PROTECTED]> wrote: > Strong typing can be more clearly seen in something like haskell where > you can define a function > > len [] = 0 > len [ _ | A ] = 1 + len A Actually, in Haskell this would be:
len [] = 0 len (_:a) = 1 + len a > the compile will automatically detect that the len function has the > signature "list of * -> int" In Haskell this would be: forall a b. (Num b) => [a] -> b (A function from a list of things to an arbitrary numeric type. That's sexy, btw.) > and will then issue a compile time error if you call len "foo". As Strings in Haskell are lists of chars, this will work just fine <wink> ;-) Confusingly yours, Michael
