Article View: comp.lang.misc
Article #3423Re: Dynamic typing (part 3)
From: Michael Coffin
Date: Tue, 09 Apr 1991 17:08
Date: Tue, 09 Apr 1991 17:08
18 lines
1213 bytes
1213 bytes
In article <1991Apr9.110217.10963@mathrt0.math.chalmers.se> augustss@cs.chalmers.se (Lennart Augustsson) writes: >... I'll just have to make another plug for >polymorhic type deduction. Here's a version of map in Haskell (ML >would be very similar): > > map f [] = [] > map f (x:xs) = f x : map f xs > >This also handles infinite lists (of course). Not to put down Haskell, but in some ways this isn't nearly as powerful as the Icon version. Icon lists aren't constrained to be homogenous, as Haskell lists are. So while "map" works for any Haskell list, it only manages to do so by putting artificial constraints on what lists can contain. -mike
Technical Details
Message-ID:
<1991Apr9.170838.16504@watmath.waterloo.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!news.cs.indiana.edu!maytag!watmath!tolstoy.waterloo.edu!mhcoffinReferences:
<1593@optima.cs.arizona.edu> <1991Apr9.110217.10963@mathrt0.math.chalmers.se>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!news.cs.indiana.edu!maytag!watmath!tolstoy.waterloo.edu!mhcoffin From: mhcoffin@tolstoy.waterloo.edu (Michael Coffin) Newsgroups: comp.lang.misc Subject: Re: Dynamic typing (part 3) Message-ID: <1991Apr9.170838.16504@watmath.waterloo.edu> Date: 9 Apr 91 17:08:38 GMT References: <1593@optima.cs.arizona.edu> <1991Apr9.110217.10963@mathrt0.math.chalmers.se> Sender: news@watmath.waterloo.edu (News Owner) Organization: University of Waterloo Lines: 18