Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15100

Define function using lists or tables

From Joaquim Nogueira <jen@fct.unl.pt>
Newsgroups comp.soft-sys.math.mathematica
Subject Define function using lists or tables
Date 2013-07-03 08:49 +0000
Message-ID <kr0oij$3dv$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


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.

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Define function using lists or tables Joaquim Nogueira <jen@fct.unl.pt> - 2013-07-03 08:49 +0000
  Re: Define function using lists or tables "Nasser M. Abbasi" <nma@12000.org> - 2013-07-03 22:06 +0000

csiph-web