@xpqz It is not necessarily a "model" solution - it is a correct solution created by a student intern who was new to APL. You are welcome to submit a pull request with a more elegant test solution.
@RikedyP I only meant to highlight what seemed to be the intent, not to comment on the level of elegance (for which I'm clearly unqualified to comment). Using ⍉ seemed like side-stepping the difficulty.
> The Unix time number is zero at the Unix epoch, and increases by exactly 86400 per day since the epoch. Thus 2004-09-16T00:00:00Z, 12677 days after the epoch, is represented by the Unix time number 12677 × 86400 = 1095292800. This can be extended backwards from the epoch too, using negative numbers; thus 1957-10-04T00:00:00Z, 4472 days before the epoch, is represented by the Unix time number −4472 × 86400 = −386380800.
Are there any resources or history on the design of ?? It seems to me like dyadic ? would have been better off as {⍵[⍺?≢⍵]} which makes current dyadic ? trivially ?∘⍳, and simplifies the above.
Hi everyone - I'm an APL newbie who's been learning the language for a few months and I'm really enjoying it so far. I'll try to ask questions here if I get stuck :)
I didn't know about the update. Thanks for telling me!
APLcart is really useful. I was about to ask a question here about generating the Collatz sequence (I managed to write a function that works but I wasn't quite sure if it was the best way to do it) but then I found an entry on the website
@Adám yeah, nice, I actually thought of that on the way home but you beat me to it :) not sure how much it matters but {⍺⍴⊆⍣¯1,⌿⎕IO+⍵⊤⍺?⍥(×/)⍵} seems slightly better so it still works with scalar + scalar and works with ⎕IO properly