Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

What makes things Listable?

  • To: mathgroup at
  • Subject: [mg26302] What makes things Listable?
  • From: Chris Johnson <cjohnson at>
  • Date: Sun, 10 Dec 2000 00:20:11 -0500 (EST)
  • Sender: owner-wri-mathgroup at

I'm using the "Finance Essentials" package and want to use the Value
command over a list of bonds.  For those not familiar with the package,
there is a structure called Bonds which defines the coupon, maturity,
etc. for a bond.  The Value command takes three arguements, Bond,
SettlementDate, YieldToMaturity and returns a price.

Having vectors of Bonds, Dates, and Yields, I want to create a vector
of prices.  My first guess was to try the following command:

This returned the result

My next step was to use Map[Value,Transpose[...]] which returned a list
like {Value[{bond,valdate,ytm}],...} where the parameters for Value are
surrounded by curly braces.  Value wouldn't evaluate over parameters in
this form.

The solution I found for now is to create my own fuction


and then mapping cjValueList provides the table I seek.  I have run into
this general problem of wanting to get rid of the outer level of curly
braces before, and wonder if there is a more general solution then this
hack redefinition of the function?

Chris Johnson

  • Prev by Date: Re: Getting coordinates of array member
  • Next by Date: Re: Mathlink probs under Unix
  • Previous by thread: Re: "?" to find symbols
  • Next by thread: Re: What makes things Listable?