variable boxing

18 views
Skip to first unread message

Richard Donovan

unread,
Oct 6, 2025, 6:29:56 AM (9 days ago) Oct 6
to forum
Hi

I'm looking for a good way to create a dyad d that reproduces:

,. 0 1 2 3 4 ; 5 6 7 8 9 ; 10 11 NB. The long way!

┌─────────┐

│0 1 2 3 4│

├─────────┤

│5 6 7 8 9│

├─────────┤

│10 11    │

└─────────┘

 


with a dyad such that (3 5) d i.11 will produce the above so I

can produce boxed lists of shape x with all alignment done.


 x is two positive integers and y is the "filling". Assume (#y)>0

Thanks



Marcin Żołek

unread,
Oct 6, 2025, 6:59:56 AM (9 days ago) Oct 6
to fo...@jsoftware.com
Just a small hint I thought might be useful: consider using infix adverb
u\
You can find the complete solution at this link to Juno:
https://jsoftware.github.io/juno/app/?c1=%2C.%203%205%20%28%3C%5C~%20-%40%7B%3A%29~%20i.%2011
Clicking line number in editor will show visual illustration (Dissect)
of how the solution executes.

Cheers,
Marcin

Devon McCormick

unread,
Oct 6, 2025, 8:00:52 AM (9 days ago) Oct 6
to fo...@jsoftware.com
Marcin's solution looks good and perhaps highlights the over-specification of requiring two numbers for the left argument since we can ignore the first one.

To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@jsoftware.com.



--

Devon McCormick

Flâneur


bill lam

unread,
Oct 6, 2025, 9:53:16 AM (9 days ago) Oct 6
to fo...@jsoftware.com
try this

_5 <\ i.11

+---------+---------+--+
|0 1 2 3 4|5 6 7 8 9|10|
+---------+---------+--+
Reply all
Reply to author
Forward
0 new messages