user-defined operators

Luke Gorrie luke@REDACTED
Fri Mar 26 14:44:32 CET 2004

Eric Newhuis <enewhuis@REDACTED> writes:

>> F `each` [ItemsX, ItemsY].
>> ...where F is a function of two variables.
> Perhaps I could have more clearly expressed this as:
> Plot `eachPairOf` [XCoordinates, YCoordinates].
> The idea is that one applies Plot over each pair of elements in
> vectors XCoordinates and YCoordinates.
> Not everyone wants to view the world as a list of records.

But not everyone wants to view the world as a set of matrices

Special syntax will make certain things convenient, but higher-order
functions will still be the general solution for control
structures. It seems to me a bigger win if we could make those better

Have we already had a syntax-war about nice'n'short Smalltalk-style
syntax for funs? e.g.

  foldl(|(X, Y) -> X + Y|, 0, [1,2,3,4])

P.S., nobody jumped on my for using foreach({erlang,'+'}, ...). Has
Uppsala lost 'net connectivity? :-)


More information about the erlang-questions mailing list