|
From: | Ralf Hemmecke |
Subject: | Re: [Axiom-developer] about Expression Integer |
Date: | Tue, 21 Feb 2006 12:21:39 +0100 |
User-agent: | Thunderbird 1.5 (X11/20051201) |
Just curious: The syntax: map(f:R -> S)(p:RX):SX == {... looks strangely abbreviated to me. Why not write: map(f:R -> S):RX->SX ==(p:RX):SX +-> { ... Is this equivalent?
Yes. And to make it even clearer...In Aldor "==" defines a constant. And the constant here is "map". So it should actually be written as
map: (R -> S) -> RX -> SX == { (f: R -> S): (RX -> SX) +-> { (p: RX): SX +-> {...} } } We all know that functions are first class citizens. http://www.aldor.org/docs/HTML/chap6.html#5You probably agree that it is somehow a good thing that the Aldor compiler adds a bit of syntactic sugar for such constructions.
Ralf
[Prev in Thread] | Current Thread | [Next in Thread] |