Closed miles-cg closed 6 years ago
I'd rather use i
instead of j
. That way, we can use Æi
for x+yj -> [x, y], Æị
for [x, y] -> x+yj, and æị
for the dyad you propose.
Sure, I only chose j
since that was the letter used in J. Æị
is a nice extra idea for mapping over pairs. I'll edit those in.
So obviously Æị
would operate at ldepth = 1
, and the first three cases of length 0, 1, and 2 are [] -> 0, [x] -> x. and [x, y] -> x+yj, but what if the list is longer? For example, [x, y, z] -> x+yj? and ignore the tail?
Truncating works, I think.
There's a .interpreter.py.swp file in the jelly directory. That should be removed, no?
Motivated by https://codegolf.stackexchange.com/questions/162337/seats-in-a-finnish-cinema There were a few previous challenges where using complex numbers could have saved a few bytes also.
Based on
j.
and+.
from J.