Given the integers p, q and n I would like to generate a vector of length n with the elements
(⌊p ÷ q) (⌊(⌊p ÷ q) ÷ q) ...
In other words I want to construct a vector where the i:th element is {⌊⍵ ÷ q} applied i times on p. How can I do that in APL?
@TessellatingHeckler Oh, don't get me wrong. It certainly should be fixed, and we're grateful that you reported it, it may just take some time to be fixed. John was working on this feature when he passed away, so it has some unfinished parts. If you use ]box -t=parens (which he had implemented long time ago) it displays right.
Incidentally, I'm trying to do the 2018 Advent of Code puzzles and I'm stuck on Day 1 XD. I'm just trying to paste the 951 different numbers into APL, and I keep getting input errors
I want to get an array of a function f applied argument n, n times: n (f n) (f f n) ... ((f repeated n times) n). I know this is possible using the fixpoint operator ⍣, but I wish to do this using the each operator ¨ instead.
A valid solution is something like {(f⍣⍵)n}¨⍳n, but I want to rewrite this as a train. How do I do it?
@ZhengqunKoo you aren't able to pass operator operands from trains
@voidhawk (and also everyone else using RIDE!) there's a Backward or Undo shortcut (by default set to ctrl-shift-backspace, which i've replaced with ctrl-d). It goes trough the history of entered things, making it very quick&easy to modify the previous executed thing
i've now set up day ← {⍺←2019 ⋄ ≢p⊢←(method:'GET' ⋄ e:(cookie:'session=....')) ⎕lns "https://adventofcode.com/",(⍕⍺),"/day/",(⍕⍵),"/input"} for myself (not that i'll be trying to get wr times (probably, maybe))
@Sherlock9 I cribbed from Jay Foad's Advent of Code 2018 answers here github.com/jayfoad/aoc2018apl to get ideas; might be a place to reference if you haven't seen them before.