aboutsummaryrefslogtreecommitdiff
path: root/challenge-018/aecepoglu/bqn/ch-2.bqn
blob: a886ebbdf3aa8517e415c45e3912bae8bed77fb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
cache{
 Empty{0=≠𝕩}
 Push{(⍋⊑¨)𝕩𝕨}
 Pop{(⊏⋈(1↓⊢))𝕩}
}

a(⍋⊑¨)22,"a",1,"b",4,"c"
0=cache.Empty a
1=cache.Empty 2⟨⟩
0"x" cache.Push a
1"x" cache.Push a
3"x" cache.Push a
5"x" cache.Push a
5"x" cache.Pop  a