gordonguthrie / pometo

A little APL for the BEAM
Apache License 2.0
12 stars 3 forks source link

monadic iota axis transposition #30

Closed cannadayr closed 2 years ago

cannadayr commented 4 years ago
fun(S) -> io:put_chars(pometo:interpret_TEST(S)) end("⍳2 2").
┌───┐ ┌───┐
│1 1│ │2 1│
└───┘ └───┘
┌───┐ ┌───┐
│1 2│ │2 2│
└───┘ └───┘

Gnu APL and Dyalog:

      ⍳ 2 2
 1 1  1 2 
 2 1  2 2 

      ⍳ 2 2 2 2
 1 1 1 1  1 1 1 2 
 1 1 2 1  1 1 2 2 

 1 2 1 1  1 2 1 2 
 1 2 2 1  1 2 2 2 

 2 1 1 1  2 1 1 2 
 2 1 2 1  2 1 2 2 

 2 2 1 1  2 2 1 2 
 2 2 2 1  2 2 2 2 

src/pometo_runtime_monadic.erl

gordonguthrie commented 3 years ago

Merged your PR and I think this is fixed? Changed my documentation as well.