~jshholland/trybqn

4e81c0005778b5108c7bdf970bec030b192454cf — Josh Holland 5 months ago 86bbbd2 master
use new ⋈ builtin
2 files changed, 3 insertions(+), 3 deletions(-)

M 2015.bqn
M 2020.bqn
M 2015.bqn => 2015.bqn +2 -2
@@ 38,8 38,8 @@ Prob5 ⇐ (√≠÷˜·+´·×˜¨⊢-+´÷≠)⥊
# rectangles and returns a 1 if the rectangles overlap. The co-ordinates
# could be either (upper-left, lower-right) or (upper-right, lower left)
Prob6 ⇐ {w1‿w2 𝕊 x1‿x2:
  wll‿wur ← w1 (⌊¨≍○<⌈¨) w2
  xll‿xur ← x1 (⌊¨≍○<⌈¨) x2
  wll‿wur ← w1 (⌊¨⋈⌈¨) w2
  xll‿xur ← x1 (⌊¨⋈⌈¨) x2
  wll‿xll‿wur (∨○((⊢≡∧)⊑¨) ∧ ∨○((⊢≡∧)1⊸⊑¨)) xll‿wll‿xur
}


M 2020.bqn => 2020.bqn +1 -1
@@ 6,7 6,7 @@
# second vector contains the remaining elements.
# If X<0, the second vector contains the last |X elements of Y and the
# first vector contains the remaining elements.
Prob1 ⇐ ⊣1⊸⌽⍟(<⟜0)↑≍○<↓
Prob1 ⇐ ⊣1⊸⌽⍟(<⟜0)↑⋈↓

# Write a function that, given a right argument which is a simple integer
# vector representing valid UTF-8 text, encloses each sequence of integers