MathGroup Archive 1999

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

Search the Archive

Re: Pattern of a List of Pairs

  • To: mathgroup at
  • Subject: [mg20889] Re: Pattern of a List of Pairs
  • From: "DIAMOND Mark" <noname at>
  • Date: Sat, 20 Nov 1999 01:07:04 -0500 (EST)
  • Organization: The University of Western Australia
  • References: <812ajv$>
  • Sender: owner-wri-mathgroup at

Hans Steffani wrote in message <812ajv$1hc at>...
>I need a function wich gets a list of pairs. How do I build
>the head of this function.

It is not clear exactly what you mean. Do you mean that you want the
function header for a function which will ONLY accept a list of pairs of
numbers, in which case something like

f[ xypairs:{{_Real,_Real}..}] :=

will give you what you want. This
checks for a list of one or more pairs of real numbers. Changing to three

f[ xypairs:{{_Real,_Real}...}] :=

will accept an empty list

Changing to

f[ xypairs:{{_?NumericQ, _?NumericQ}..}] :=

will check for numeric values, not necessarily real. Look at the
documentation for  Pattern (and related words and headings) in the master

  • Prev by Date: Re: Pattern of a List of Pairs
  • Next by Date: Re: Cryptography
  • Previous by thread: Re: Pattern of a List of Pairs
  • Next by thread: Re: Orderless indexed functions