bqn poking

This commit is contained in:
rhiannon morris 2022-12-21 18:02:25 +01:00
parent 26b649080e
commit 39c89ada3d
1 changed files with 4 additions and 4 deletions

View File

@ -2,12 +2,12 @@
Sub {ab𝕊𝕩:ba𝕩}
# e Split xs: split xs on occurrences of e (default 0)
Split {( 1¨(1)) Sub𝕩¨ (» ¨ -») /w=𝕩(w𝕨0)}
Split {( 1¨(1)) Sub𝕩¨ (» ¨ -») /w¨𝕩w𝕨0}
# n Chunk xs: split into chunks of length n (the last one might be smaller)
Chunk {(𝕨÷˜𝕩)𝕩}
Day1 ( (+´3))(+´¨)Split(•BQN0¨)•FLines
Day1 {( (+´3)) +´¨ •BQN1 "" Split •FLines 𝕩}
# ⟨ 72602 207410 ⟩
Day2 {
@ -68,8 +68,8 @@ Day10 ⇐ {
# (but the string is a big banner)
Day18 { # part 1 only :[
grid (> 1+˝) •BQN¨ '‿'(=',')0 •FLines 𝕩
touch +´ «» {(𝕎𝕩) grid} 1+3
grid (> 1+´) •BQN¨ '‿'(=',')0 •FLines 𝕩
touch +´ «» {(𝕎𝕩)grid} 1+3
+´ (6×grid)-touch
}
# 3470