uCBQN/test/joinReuse.bqn
2022-07-09 02:00:22 +03:00

30 lines
914 B
BQN
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

VVariation LVListVariations•internal
AllEq !¨ (<¨)
# run with -DPRINT_JOIN_REUSE
# all that's important in the output is that there are at least some "reuse:1"s and "reuse:0"s for each item
{ w𝕊x:
•Out "next"
AllEq t {( ) (𝕨 V w)𝕩 V x}´ LV¨ 𝕨𝕩
•Out "" •Show t
}´¨
"ab"["01","23"]
["ab","cd"]"01"
["ab","cd","ef"]["01","23"]
[["ab","cd"]["ef","gh"]["ij","kl"]]["01","23"]
{𝕊:
{ w𝕊x:
•Out "next"
AllEq t {(𝕨 V w)𝕩 V x •Out "Expected error, didn't get one; fail" •Exit 1}{𝕊:•CurrentError@}´ LV¨ 𝕨𝕩
•Out "" •Show t
}´¨
"abc"["01","23"]
["ab","cd"]"012"
["ab","cd","ef"]["012","345"]
[["ab","cd"]["ef","gh"]["ij","kl"]]["012","345"]
} 0=•args