MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: the new @@@ thing, MapApply?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20916] Re: the new @@@ thing, MapApply?
  • From: John Tanner <john at janacek.demon.co.uk>
  • Date: Wed, 1 Dec 1999 01:49:49 -0500 (EST)
  • References: <805vob$de4@smc.vnet.net> <80avfb$hht$3@dragonfly.wolfram.com>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <80avfb$hht$3 at dragonfly.wolfram.com>, Martin Kraus
<Martin.Kraus at informatik.uni-stuttgart.de> writes
>Daniel Reeves wrote:
>> 
>> I can't find any documentation on the new @@@ function in version 4.
>> Could someone explain it?  Or confirm the following:
>> 
>> It looks like
>> f @@@ { {a,b,c}, {d,e,f}, ... }
>> is equivalent to
>> f @@#&/@ { {a,b,c}, {d,e,f}, ... }
>> in other words,
>> like Map, but doing Apply to each element.
>> 
>> --    --    --    --    --    --    --    --    --    --    --    --
>> Daniel Reeves               http://ai.eecs.umich.edu/people/dreeves/
>> 
>> Well, you know when you're rocking back in a chair, and you go so
>> far that you almost fall over backwards, but at the last instant you
>> catch yourself?  That's how I feel all the time.    -- Steven Wright
>
>Is there a prize for the most cryptic programming language?
>
>Just wondering...
>
>Martin Kraus
>
>
>

The prize has already been won by the truly mystical APL.  There are
many similarities between Mathematica and APL (despite the fact that it
is normally possible to READ Mathematica code (!) ...).  There are some
references in the Mathematica book to APL (in the index only...), in
particular the various Map and Apply functions provide analogues to the
various uses of "scan" (\) as well as "reduce" (/).  I am sure this
similarity is no accident.

This prompts me to wonder if it is possible to produce an APL emulator
using Mathematica?  A Lisp emulator has already been generated, but APL
presents more problems.  The pattern matching aspects and infix
operators would need some care to set up, and the representation of
lists without brackets would be a problem.  I also can't see how to
generate the overstruck character operators - does this need a new
character set?

perhaps a perfect APL emulator within Mathematica is not possible [or
desirable] since it would have to limit Mathematica's capabilities - I
cannot see how it would be possible to retain   

There are some things in APL that I do miss (especially the expressions
on peoples faces when trying to explain what a single line of APL code
did...).  Why use 3 characters when 1 will do?

-- 
  from -   John Tanner                 home -  john at janacek.demon.co.uk
  mantra - curse Microsoft, curse...   work -  john.tanner at gecm.com
I hate this 'orrible computer,  I really ought to sell it:
It never does what I want,      but only what I tell it.



  • Prev by Date: How to: Read Notebook and auto-evaluate ?
  • Next by Date: Re: goto & Findmininimum
  • Previous by thread: Re: How to: Read Notebook and auto-evaluate ?
  • Next by thread: Re: Convex Hull