MathGroup Archive 1996

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

Search the Archive

Re: substitue expression for function f as argument in mma

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3647] Re: substitue expression for function f as argument in mma
  • From: pecora at zoltar.nrl.navy.mil (Louis M. Pecora)
  • Date: Sun, 31 Mar 1996 00:52:16 -0500
  • Organization: Naval Research Laboratory
  • Sender: owner-wri-mathgroup at wolfram.com

In article <4jd5gg$pmr at dragonfly.wolfram.com>, george at mech.seas.upenn.edu
( George Jefferson ) wrote:

> where a mma  function takes a function as an argument,
> eg: Select[expr,f]
> 
> and "f" is a simple function say
> 
>  f[x_] := x < 0
> 
> is there a way to define the function directly in the
> argument list?  something like:
> 
> Select[expr, arg < 0]
> 
> of course that doesnt work, but it seems like an issue if figuring
> out the syntax..

Sounds like you want to use a pure function (Function[...]).  See that
topic in the Mathematica Book.

-- 
Louis M. Pecora
pecora at zoltar.nrl.navy.mil

/* My views and opinions are not those of the U.S. Navy.
   If you want those, you have to start a war.  */

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: substitue expression for function f as argument in mma
  • Previous by thread: Re: substitue expression for function f as argument in mma
  • Next by thread: Mathematica to C