bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] Dyalog power operator, what does it do?


From: Elias Mårtenson
Subject: [Bug-apl] Dyalog power operator, what does it do?
Date: Fri, 7 Mar 2014 17:15:37 +0800

Can you guys tell me if I understand what the power operator actually does? The way I see it, it calls a function for a certain number of times, or until the function returns the same thing as its input.

I made an implementation of it, to have something to experiment with. Can you guys tell me if I did it right?

Z←N (OP powerop) V;I          
→(0≠⎕NC 'N')/skip             
N←¯1                          
skip:                         
I←0                           
Z←V                           
next:                         
→(((N≥0)∧I≥N) ∨ (I>0)∧Z≡V)/end
Z←OP V←Z                      
I←I+1                         
→next                         
end:

Regards,
Elias

reply via email to

[Prev in Thread] Current Thread [Next in Thread]