inhabit - pat
- xs
Picks patterns (or plain values) either from a list (by index) or a lookup table (by name).
Similar to pick, but cycles are squeezed into the target ('inhabited') pattern.
let a = s("bd(3,8)")
let b = s("cp sd")
"<a b [a,b]>".inhabit({ a, b }) s("a@2 [a b] a"
.inhabit({a: "bd(3,8)", b: "sd sd"}))
.slow(4) aliases: pickSqueeze()
| parameter | type |
|---|---|
| pat | |
| xs |
|
| returns |