jsoftware / jsource

J engine source mirror
Other
657 stars 90 forks source link

extend fit conjunction #43

Open tangentstorm opened 3 years ago

tangentstorm commented 3 years ago

This would allow overtake on a boxed array to supply the fill (boxed) element suitable for further processing.

In dictionary format -

Fit(Customize)  u !. v

The case of !. with a verb right argument is defined in terms of the noun right
argument case (u !. n) as follows:

x u !. v y  <-->  x u!.(x v y) y
  u !. v y  <-->    u!.(  v y) y

and

Fit(Customize)  u !. n

This conjunction modifies certain verbs in ways prescribed in their definitions.

Case  n is not a gerund, ...(same as current definition )
Case  n is a gerund. (Compare with the gerund cases of the merge adverb } and power conjunction ^: )
x u!.(v0`v1`v2) y  <-->  (x v0 y) u!.(x v1 y)  (x v2 y)
x u!.(   v1`v2) y  <-->      x    u!.([`v1`v2)    y
  u!.(   v1`v2) y  <-->           u!.(v1 y)    (v2 y)

Because a gerund is a boxed noun there may be an issue with the second case. It may be the case that a gerund may be a valid fill (or other customisation) element so that fit evoking the gerund would not be possible.

However having a verb right argument for the fit conjunction seems possible. The verb could inspect both x and y to determine an appropriate fill element.

-- Ian Shannon <2010-07-28T09:36:30Z>