MathGroup Archive 2013

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

Search the Archive

Define function using lists or tables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg131397] Define function using lists or tables
  • From: Joaquim Nogueira <jen at fct.unl.pt>
  • Date: Wed, 3 Jul 2013 04:58:46 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

Hello. Possibly this is a very simple question.

Is there a way to define a function over a (BIG) list of ordered pairs? I mean, suppose that I have a list, created using a Table command or something like that, of the form [{a,b},{c,d},etc.] such that, after naming it f, say, f = [{a,b},{c,d},etc.], then, afterwards, whenever there is a command such that one needs to compute f[a] (or f[c]), the program immediately replaces f[a] by b,and f[c] by d?

Thank you.



  • Prev by Date: radial intensity
  • Next by Date: Re: Rather simple function returns curious result. Explanation
  • Previous by thread: radial intensity
  • Next by thread: Re: Define function using lists or tables