1

I define a as an array and find the running max:

  a =: 3 1 4 1 5 9 2
  >./\ a
3 3 4 4 5 9 9

Then I want to filter out duplicates. I know that nub (~.) does this, so I try:

  ~. >./\ a
3 4 5 9

It works but I don't know why. I thought it should not work. / and \ are adverbs, so (>./\) is a verb. We then have: f g y, which is a hook, and it should be executed as y f (g y). Obviously it does not work that way.

Instead, it's executed as ~. (>./\) (i.e. f (g y)), like it was ~. @ (>./\). So what's going on here?

Thanks.

4

1 に答える 1

4
于 2013-09-03T13:30:57.450 に答える