MathGroup Archive 2003

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

Search the Archive

Convert list into function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41523] Convert list into function
  • From: rbhatnagar <rajb at stanford.edu>
  • Date: Sat, 24 May 2003 01:05:21 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

A simple question: What is the correct way of converting a list into a
function?

For instance, lets say I have some list
L = {1, 2, 3, 4}

and I want a function such that FuncL[1] would return 1, FuncL[2] would
return 2 and so on.  So what is the syntax for FuncL?

I need the function for some further manipulation in a situation in which
simply using L[[1]] would not be appropriate.

Thanks,
R. Bhatnagar




  • Prev by Date: fyi: numerical differentiation
  • Next by Date: Optimizing Non-linear Functions
  • Previous by thread: fyi: numerical differentiation
  • Next by thread: Optimizing Non-linear Functions