From 26bf316a0835875bd6182eef6770305061e383cd Mon Sep 17 00:00:00 2001 From: Alfie <6824891+aaaaargZombies@users.noreply.github.com> Date: Mon, 2 Sep 2024 20:36:16 +0100 Subject: [PATCH] affine-cypher: typo (#1520) * chore: typo * Also fix typo in example solution --------- Co-authored-by: Angelika Tyborska --- exercises/practice/affine-cipher/.meta/example.ex | 2 +- exercises/practice/affine-cipher/lib/affine_cipher.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/practice/affine-cipher/.meta/example.ex b/exercises/practice/affine-cipher/.meta/example.ex index b857c193cb..53c0c9c302 100644 --- a/exercises/practice/affine-cipher/.meta/example.ex +++ b/exercises/practice/affine-cipher/.meta/example.ex @@ -34,7 +34,7 @@ defmodule AffineCipher do @doc """ Decode an encrypted message using a key """ - @spec decode(key :: key(), message :: String.t()) :: {:ok, String.t()} | {:error, String.t()} + @spec decode(key :: key(), encrypted :: String.t()) :: {:ok, String.t()} | {:error, String.t()} def decode(%{a: a, b: b}, encrypted) do if Integer.gcd(a, @alphabet_size) != 1 do {:error, "a and m must be coprime."} diff --git a/exercises/practice/affine-cipher/lib/affine_cipher.ex b/exercises/practice/affine-cipher/lib/affine_cipher.ex index f04dc5cc1e..1fab119051 100644 --- a/exercises/practice/affine-cipher/lib/affine_cipher.ex +++ b/exercises/practice/affine-cipher/lib/affine_cipher.ex @@ -14,7 +14,7 @@ defmodule AffineCipher do @doc """ Decode an encrypted message using a key """ - @spec decode(key :: key(), message :: String.t()) :: {:ok, String.t()} | {:error, String.t()} + @spec decode(key :: key(), encrypted :: String.t()) :: {:ok, String.t()} | {:error, String.t()} def decode(%{a: a, b: b}, encrypted) do end end