On 8/25/07, skaller <[EMAIL PROTECTED]> wrote: > Of course it does, but that's because you're an idiot :)
Haha :p > If you know the list on the RHS of the -> symbol is non-empty, > then you can probably do this with a typematch .. something like: > > typematch typeof (list (1,2,3)) with > | list [?t] => ?t > endmatch Thats an interesting idea. Is this what var/val essentially do? I've just personally always wanted a tiny bit of local inference when all the types are specified. Situations where you've got something like: val xs:list[int] = list(1, 2, 3); val ys = map (fun x => x + 1) xs; but you really need this: val ys = map (fun (x:int) => x + 1) xs; Occasionally makes me want to yell at the type checker since I already specified that the inner type of int. I doubt we can do this without gobs of work though. > looks like it should work .. but probably doesn't. A simpler > solution is just > > [ x * 3 | x : int <- [1,2,3] ] > > which also works for an empty list. Thats what I'm planning on doing. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language