Don,

So far the all the evidence and advice brought up in this thread suggests that:
  * explicit reference to arguments in equations is likely to be less
    confusing to math students (or beginning J users) than tacit or 
    implicit references.
  * the use of a little additional syntax to define verbs presents 
    little or no barrier to students unfamiliar with J and/or 
    programming.

I wonder at this point whether you would be receptive to going back to an 
earlier suggestion in post by Oleg proposing a "verb definition mode"?

The implementation details are specified on the wiki page:
<http://www.jsoftware.com/jwiki/Phrases/Definitions>

If the adverb "defn" on that page were renamed "Let" you could use it in a 
session like this:

==============
NB. blah blah intro
NB. For:
   y=: 3 4 9 4 3 8 5 
NB. The mean is
   (+/y) % #y
4.6

NB. ... when want to define verbs:

   ''Let
mean=: (+/y) %  #y
ssdev=: +/ *: y - mean y
var=: (ssdev y) % <:#y
stddev=: %: var y
)
   mean y
4.6
   ssdev y
29.2
   var y
7.3
   stddev y
2.70185

==================

If you wanted to get really picky you could define a noun 
   Now=: 'whatever you like cause it just gets ignored'

So that you could write:

  Now Let
coeffvar=: (stddev y) % mean y
)

That's getting pretty close to the treatment of equations in a text book?

Note you are free to make the definition for stddev one big line if you like, I 
just think that dividing it up into meaningful bits as above is more 
illuminating (not to mention flexible).


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

Reply via email to