Clojure: (every? #(= % (first cpf)) cpf)
Elixir: String.graphemes(cpf) |> Enum.all?(&(&1 == String.first(cpf)))
F#: cpf |> Seq.forall (fun c -> c = cpf.[0])
Haskell: all (== head cpf) cpf
Java: cpf.chars().allMatch(ch -> ch == cpf.charAt(0));
Kotlin: cpf.all { it == cpf[0] }
Python: all(char == cpf[0] for char in cpf)
Ruby: cpf.chars.all? { |c| c == cpf[0] }
Rust: cpf.chars().all(|c| c == cpf.chars().next().unwrap());
Scala: cpf.forall(_ == cpf.head)
Swift: cpf.allSatisfy { $0 == cpf.first }