> From: Sherlock, Ric
> > From: Saunders, John (Health)
> >
> > Hello I have the below line to test if an integer is a palindrome but
> > couldn't work out how to do this tacitly could anyone kindly provide
> > a tacit example ?
> >
> >
> isPalin0=: = |.&.":
> isPalin1=: (-: |.)@":
> 

If you want to test a vector of integers, then you'll need to use "0 or this 
version:

   isPalin2=: (-: |.)&>@(8!:0)

   isPalin2 134431 45544
1 0
   isPalin2 134431 4554
1 1
   isPalin0"0 ]134431 45544
1 0
   isPalin1"0 ]134431 45544
1 0

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to