Test of a pure function
- To: mathgroup at smc.vnet.net
- Subject: [mg34010] Test of a pure function
- From: "Shawn O'Connor" <soconnor at ccs.nrl.navy.mil>
- Date: Fri, 26 Apr 2002 03:27:37 -0400 (EDT)
- Organization: Naval Research Laboratory, Washington, DC
- Sender: owner-wri-mathgroup at wolfram.com
Hello,
I hope someone can help me with this I know the solution should be easy
but I am still learning how pure functions work.
I am trying to pick out a position in a list were a number falls i.e.
Position[xBins, _?(#1<=x <= #2 &)]. I keep getting errors Like these
Function::slotn: Slot number 2 in #1¾x¾#2& cannot be filled
from \
(#1¾x¾#2&)[List].
Function::slotn: Slot number 2 in
#1¾x¾#2& cannot be filled from \
(#1¾x¾#2&)[-1].
From
In[83]:=
Function::slotn: Slot number 2 in #1¾x¾#2& cannot be filled from
\
(#1¾x¾#2&)[-0.995].
General::stop: Further output of
Function::slotn will be suppressed during \
this calculation.
Can I make a comparison with the nth and nth+1 element in a pure function.
Thank you,