fFc=: (32&+)@(*&1.8) ]b=:fFc _40 0 100 _40 32 212 cFf=: fFc^:_1 cFf b _40 0 100The result of the phrase f &. g is the verb (g^:_1)@(f & g) . The function g can be viewed as preparation (which is done before and undone after) for the application of the “main” function f . For example:
b=: 0 0 1 0 1 0 1 1 0 0 0
sup=: </\ Suppress ones after the first
sup b
0 0 1 0 0 0 0 0 0 0 0
|. sup |. b Suppress ones before the last
0 0 0 0 0 0 0 1 0 0 0
sup&.|. b
0 0 0 0 0 0 0 1 0 0 0
3 +&.^. 4 Multiply by applying the exponential
12 to the sum of logarithms
(^.3)+(^.4)
2.48491
^ (^.3)+(^.4)
12
]c=: 1 2 3;4 5;6 7 8
+-----+---+-----+
|1 2 3|4 5|6 7 8|
+-----+---+-----+
|.&.> c Open, reverse, and then box
+-----+---+-----+
|3 2 1|5 4|8 7 6|
+-----+---+-----+
Exercises
| 26.1 | Use the following as exercises in reading and writing.
Try using arguments such as a=: 2 3 5 7 and b=: 1 2 3 4
and c=: <@i."0 i. 3 4 : f=: +&.^. Multiplication by addition of natural logs g=: +&.(10&^.) Multiplication using base-10 logs h=: *&.^ Addition from multiplication i=: |.&.> Reverse each box j=: +/&.> Sum each box k=: +/&> Sum each box and leave open |