Skip to content

Commit 3de4264

Browse files
committed
added xunwrap
1 parent 4f59c36 commit 3de4264

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

p.q

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ embedPy:{[f;x]
3232
x0~`.;f;x0~`;py2q f; / extract as foreign or q
3333
wrap pyfunc[f]. x]} / default, call
3434
unwrap:{$[i.isw x;x`.;x]}
35+
xunwrap:{$[0=t:type x;.z.s each x;98=t;flip .z.s flip x;99=t;.z.s[key x]!.z.s value x;unwrap x]}
3536
wfunc:{[f;x]r:wrap f x 0;$[count x:1_x;.[;x];]r}
3637
i.wf:{[f;x]embedPy[f;x]}
3738
wrap:ce i.wf@

0 commit comments

Comments
 (0)