Vocabulary/quotev

From J Wiki
Jump to navigation Jump to search

>> <<   Back to: Vocabulary Thru to: Dictionary

u"v m"v Copy Rank Conjunction

u"v and m"v are equivalent to u"n and m"n respectively, where n is the list of ranks of v.

The benefit of being able to use v itself, instead of its list of ranks, n, is: it saves you having to find the actual ranks of v if you want to create a verb out of verb u (or noun m) having the identical ranks of v .

a not-uncommon requirement.

Information.png For other uses of (") see:

Take e.g. these three dual-valence verb definitions which share the same body but differ in name and rank:

   v=: (3 : '<:y') : (4 : '>:x,y')
   v010=: v"0 1 0
   v001=: v"0 0 1

Showing the list of ranks for each:

   v    b. 0
_ _ _
   v010 b. 0
0 1 0
   v001 b. 0
0 0 1

Having a look at the behaviour of the verb x,y (dyadic case of Amend) which we are going to use with different ranks:

   , b. 0
_ _ _
   'abc' , 'DE'
abcDE
   'abc' ,"1 0 'DE'
abcD
abcE
   'abc' ,"0 1 'DE'
aDE
bDE
cDE

Copying the ranks from the verbs we just defined results in similar behaviour:

   'abc' ,"v 'DE'
abcDE
   'abc' ,"v010 'DE'     NB. left: whole, right: atom
abcD
abcE
   'abc' ,"v001 'DE'     NB. left: atom, right: whole
aDE
bDE
cDE

Same goes for the monadic case:

   ,"v 'DE'
DE
   ,"v010 'DE'           NB. monadic rank 0 means: atom
D
E

Note: To see the actual operand m that would be equivalent to using v in this role, use Verb Information (b.) — like this

   v=: <      NB. sample v - Box (<)
   v b. 0     NB. the list of ranks of v
_ 0 0