3
4

4 回答 4

4

Good news! As of version 0.4.0.29 (2 Aug 2013) NARS2000 supports Anonymous Functions (a.k.a. dynamic functions). For more details, see the Wiki.

于 2013-11-14T17:18:45.947 回答
3

Omega ( ⍵ ) is an identifier in NARS2000. You create a function either with the del operator or with the )EDIT command. So if you wanted to define an avg function:

)edit avg

[0] r←avg arg
[1] r←(+/arg)÷⍴arg

Control E to save, then do

   a←5 10 15 20
   avg a

12.5

于 2013-03-07T17:38:11.400 回答
1

Darn it.

NARS2000 doesn't support dynamic functions.

The feature is on the main page under Wish List of Features.

于 2012-12-09T21:39:50.147 回答
0

Actually, there is some implementation of omega/alpha dynamic functions.

Here is an example:

      ⎕SYSVER
0.4.0.29  Fri Aug 02 06:09:58 2013  Win/32

      AVG←{(+/⍵)÷⍴⍵} ⍝ computes the average
      AVG 2 3 5
3.333333333
于 2013-08-31T16:41:54.443 回答