Thomas Johnsson says:
If I recall correctly, the := to be used in array comprehensions was a
consession to the FORTRAN/Id/Sisal community, so that array comprehensions
would look more like they were used to.
Both Arvind and I think this is notation is awful, and I don't
Let me just remind people what the LML arrays does:
example:
lmlarray 1 3 f list =
array [ 1:= f [ x | (1,x) - list],
2:= f [ x | (2,x) - list],
3:= f [ x | (3,x) - list]
]
where array is
I agree, but I also agree with Lennart that both sorts of arrays are needed.
Yes, I agree on that; language design is, as always, a compromise
between the desirable semantics (in this case, as lazy as possible),
and desirable efficency, and we don't know yet how to make lazy arrays
a la LML
Mark Jones gives the following alternative definitions for Lists:
type List a b = b - (a - b - b) - b
nil :: List a b
nil f g= f
cons :: a - List a b - List a b
cons x xs f g = g x (xs f g)
fold :: b - (a - b - b) - List a b
Did I reach the whole list?
My question concerns this:
Furthermore, it makes perfect sense to declare a new type isomorphic to
an existing function type. So whereas it is *not* ok to write
data New a b = MkNew !(a-b)-- ! means strict
(because of previous discussion