Vyxapedia

Element - - Divmod

Characters:


Description

Divmod / combinations / trim / chunk-while


Overloads

  • num-num - [a // b, a % b] (divmod - division and modulo)
  • str-num - combinations of a with length b
  • lst-num - combinations of a with length b
  • str-str - overwrite the start of a with b (b + a[len(b):])
  • lst-fun - group elements in a by elements that fulfil predicate b

Examples

  • 5 3 ḋ = ⟨1|2⟩
  • 34 0 ḋ = ⟨0|0⟩
  • `abcd` 3 ḋ = ⟨`abc`|`abd`|`acd`|`bcd`⟩
  • ⟨1|2|3⟩ 2 ḋ = ⟨⟨1|2⟩|⟨1|3⟩|⟨2|3⟩⟩
  • `abcdef` `Joe` ḋ = `Joedef`
  • `Joe` `abcdef` ḋ = `abcdef`