Hi Roger,

Reporting on a problem when adverb f. fixes a bonded tact ambivalent verb.




   (9!:12 ; 9!:14) i. 0
┌─┬─────────────────────┐
│6│j602/2008-03-03/16:45│
└─┴─────────────────────┘
   (9!:3) 5

   require 'strings'

   2 cut 12 $ i. 5
┌───┬───────┬───────┐
│0 1│3 4 0 1│3 4 0 1│
└───┴───────┴───────┘

   2 cut f. 12 $ i. 5
┌───┬───────┬───────┐
│0 1│3 4 0 1│3 4 0 1│
└───┴───────┴───────┘

   2&cut f. 12 $ i. 5
|domain error
|       2&cut f.12$i.5

   cut f.
' '&$: :([: -.&a: <;._2@,~)

   2&cut f.
2&(3 : ''' ''&$: :([: -.&a: <;._2@,~) y')



   cut&(12 $ i. 5) 2
┌───┬───────┬───────┐
│0 1│3 4 0 1│3 4 0 1│
└───┴───────┴───────┘

   cut&(12 $ i. 5) f.
3 : ''' ''&$: :([: -.&a: <;._2@,~) y' :(4 : 'x '' ''&$: :([: -.&a: <;._2@,~) 
y')&0 1 2 3 4 0 1 2 3 4 0 1

=======

A left argument is bonded to verb cut.  Adverb f. produces only a monadic case 
whereas when a right argument is bonded to cut both a monadic and dyadic case 
is produced.

If an argument is bonded to a verb producing another verb, the only 
possibilities would appear to me to be a bonded dyadic verb producing a monadic 
verb.

From the above bonding on the right it appears that J is trying to cover all 
bases which (in bonding) cannot occur.

I appreciate all the depths that f. need to go into to ensure correct results 
in all cases. Should not the right bonding be simplified to

(4 : 'x '' ''&$: :([: -.&a: <;._2@,~) y')&0 1 2 3 4 0 1 2 3 4 0 1

and the left bonding be

2 & (4 : 'x '' ''&$: :([: -.&a: <;._2@,~) y')

or, knowing that monads are ruled out, just go inside the verb definition and 
extract the dyad part as in

([: -.&a: <;._2@,~)&0 1 2 3 4 0 1 2 3 4 0 1

and

2&([: -.&a: <;._2@,~)

This also happens in J7. (J7 is rather nice, I have ideas for applications 
using the web interface - thanks)

Ian
Ian Shannon
Landscape Modelling and Decision Support Section
Department of Environment, Climate Change & Water (NSW)
PO Box A290 Sydney South
NSW       1232
Phone: (02) 99 955 490
Mob:       0424 724 352
email: 
[email protected]<mailto:[email protected]>
web:   http://www.environment.nsw.gov.au<http://www.environment.nsw.gov.au/>

Please consider the environment before printing my email
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
This email is intended for the addressee(s) named and may contain confidential 
and/or privileged information. 
If you are not the intended recipient, please notify the sender and then delete 
it immediately.
Any views expressed in this email are those of the individual sender except 
where the sender expressly and with authority states them to be the views of 
the Department of Environment, Climate Change & Water NSW.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to