MathGroup Archive 2001

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

Search the Archive

Re: how applicate a function to a list??

  • To: mathgroup at
  • Subject: [mg28386] Re: [mg28368] how applicate a function to a list??
  • From: BobHanlon at
  • Date: Sun, 15 Apr 2001 00:13:37 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Not sure that I understand the question.  Giving examples would help.  
However, this may be what you want

ans = Flatten[Solve[t-3 == 0, t]]

{t -> 3}

If your function expects a number then you cannot give it a rule or a list of 

{f[ans], f /@ ans, f[ans[[1, 2]]]}

{f[{t -> 3}], {f[t -> 3]}, f[3]}

Use ReplaceAll

f[t] /. ans


Or you can apply the rule earlier in the process

ans = t /. Flatten[Solve[t-3 == 0, t]]




Bob Hanlon

In a message dated 2001/4/14 2:23:08 AM, gioacchinofabio.pellerit at 

>i know my problem is trivial but i would to know why a function applied
>to a
>list give as result:
>f(t->a number obtained before).....while i need to evaluate the function
>the value not as symbol.
>what instruction i need to use???

  • Prev by Date: Mapping a scalar against a list
  • Next by Date: RE: Nested Lists
  • Previous by thread: Re: how applicate a function to a list??
  • Next by thread: Re: log x > x - proof?