april icon indicating copy to clipboard operation
april copied to clipboard

inverse of a function with some indexing

Open justin2004 opened this issue 2 years ago • 1 comments

should april throw a domain error like dyalog does or should it be able to handle this?

CL-USER> (april "{'ABC'[⍵]}2")
#\B
CL-USER> (april "({'ABC'[⍵]}⍣¯1)'B'")
NIL
      ({'ABC'[⍵]}⍣¯1)'B'
DOMAIN ERROR
      ({'ABC'[⍵]}⍣¯1)'B'
      ∧

justin2004 avatar Dec 03 '22 02:12 justin2004

Interesting, it's a unique case for dfn inversion. You'll get a domain error when attempting to use ⌷⍣¯1 so perhaps that's what should happen in this case.

phantomics avatar Dec 05 '22 14:12 phantomics

This now returns an error, indexing is not possible in an inverted dfn.

phantomics avatar Jan 16 '23 21:01 phantomics