Impressum/Kontaktparent nodes: implemented functions

Absolute value

testAplAbsolutevalue
| data result |

"http://www.microapl.co.uk/apl_help/ch_020_020_130.htm"

"data aplAbsolutevalue"

"Makes any negative numbers in the right-hand argument positive."
self assert: #(2 4 7.8 3) asApl = #(2 -4 -7.8 3) asApl aplAbsolutevalue.

data := (Array with: #(-0.1 -10.1 11.3 25) with:(#(-10 3 -45 2.1) aplReshape:#(2 2))) asApl.
result := (Array with: #(0.1 10.1 11.3 25) with:(#(10 3 45 2.1) aplReshape:#(2 2))) asApl.
self assert: result = data aplAbsolutevalue.