⍝ various implementations of the identity matrix in GNU APL i00←{(⍳⍵)∘.=⍳⍵} ⍝from wikipedia i01←{∘.=/⍳¨⍵⍵} ⍝from wikipedia i02←{(⍵⍵⍴⍳1+⍵)∊1} ⍝11Oct23 i03←{⍵⍵⍴1,(⍵)⍴0} ⍝11Oct23 i04←{1=⍵⍵⍴⍳×/(1+⍵)} ⍝11Oct23 i05←{1=(2⍴⍵)⍴(⍵+1)|(2*1+⍵)⍴⍳1+⍵} ⍝11Oct23,12Oct23 i06←{⊃∘.=/2⍴⊂⍳⍵} ⍝11Oct23 i07←{1 0↓(⍵+1)⍵⍴(⍵+1)=(⍵+1)∨(⍳3*⍵)} ⍝11Oct23 i08←{1 ¯1↓(⍵+1)(⍵+1)⍴((1+⍵)⍴0),1} ⍝11Oct23 i09←{{(2⍴((⍴⍵)-1))⍴⍵}(1,⍵⍴0)} ⍝11Oct23 i10←{⍵⍵⍴1,⍵⍴0} ⍝11Oct23 i11←{1=⍵⍵⍴⍳1+⍵} ⍝11Oct23 i12←{1=(⍳⍵*2)[⍵⍵⍴⍳1+⍵]} ⍝11Oct23 i13←{{⍵∘.=⍵}⍳⍵} ⍝11Oct23 i14←{0=(⍵+1)|⍵⍵⍴(⍵+1),(2*⍵)⍴⍳1+⍵} ⍝12Oct23 i15←{⊃+/{⍵[2]⌽⍵[2]⊖(⍵[1])(⍵[1])⍴1,(2*⍵[1])⍴0}¨⍵,¨⍳⍵} ⍝12Oct23 i16←{⊃+/(((1+⍵)×⍳⍵)-⍵)=⍵⍴⊂(⍵⍵⍴(⍳3*⍵))} ⍝13Oct23 i17←{{⍵∨1⌽1⊖⍵}⍣⍵⊢(⍵⍵⍴1,(2*⍵)⍴0)} ⍝13Oct23 i18←{{0=⍵+2 1⍉⍵}(⍵⍵⍴(1+⍵)/⍳⍵)<(⍵⍵⍴⍵/⍳⍵)} ⍝13Oct23