codereport / jello

A Python script for wrapping Jellyfish (a fork of Jelly) so you can more easily play with the language.
MIT License
51 stars 5 forks source link

Transpose is spelt zip #23

Closed tom-huntington closed 7 months ago

tom-huntington commented 7 months ago

You ended up changing the solution https://github.com/codereport/jello/commit/e61cdcab971189be7a509f020f48e5151bbe22cc

But in you original solution:

flip w minr rev = maxr * maxr filter_out 0`   |   z`ṂṚ=Ṁ×Ṁḟ0``

You didn't use the most specialized algorithm.

You used dyadic zip z (flip in jello), when you could have used monadic zip Z to transpose the 2d array.

codereport commented 7 months ago

Right, should have guessed it borrowed zip(*___) from Python. Have renamed Jello's columns to flip and flip to flip2 https://github.com/codereport/jello/commit/bb6cff6cbee80a44a6d007562bb745833ba821ba. Thanks :pray: