rad=: 13 :'(A=:1,-. 2-:/\|:y)#"1 y' NB. Remove adjacent duplicates

   ]B=:2 4 $3 5 5 4 2 1 1  6
3 5 5 4
2 1 1 6
   rad B
3 5 4
2 1 6
 

The verb  rad  works as expected, but suppose in an earlier step  B  has
become empty, I get a length error.  Why does this happen? 


   C=:''
   rad C
|length error: rad 
|   (A=:1,-.2-:/\|:y)    #"1 y
   A
1
   1#"1 C
  
What can I do to get an empty result?

Linda 

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

Reply via email to