Vyxapedia

Element - l - Cumulative Groups / First Non-Negative Truthy Integers

Characters: l


Description

Cumulative groups (overlapping groups, aperture) / Equal length


Overloads

  • any-num - [a[0:b], a[1:b+1], a[2:b+2], ..., a[-b:]]
  • num-any - [b[0:a], b[1:a+1], b[2:a+2], ..., b[-a:]]
  • any-any - length(a) == length(b)
  • any-fun - first a non-negative integers where b is truthy
  • fun-any - first b non-negative integers where a is truthy

Examples

  • `hello` 3 l = ⟨`hel`|`ell`|`llo`⟩
  • `cake` 2 l = ⟨`ca`|`ak`|`ke`⟩
  • 2 `cake` l = ⟨`ca`|`ak`|`ke`⟩
  • 2 123 l = ⟨⟨1|2⟩|⟨2|3⟩⟩
  • 123 2 l = ⟨⟩
  • ⟨⟩ 5 l = ⟨⟩
  • ⟨1|2|3⟩ 2 l = ⟨⟨1|2⟩|⟨2|3⟩⟩
  • ⟨1|2|3⟩ 4 l = ⟨⟨⟩⟩
  • ⟨1|2|3⟩ 0 l = ⟨⟩
  • `cheese` `salads` l = 1