Changes
1 changed files (+4/-4)
-
-
@@ -10,13 +10,13 @@ def encode (s : String) := s.toList.map (λ x ↦def decode (s : String) := s.splitOn "f" |>.map (· == " ") |>.foldl (λ acc x ↦ if acc.2.length = 7 then (acc.1 ++ (acc.2 ++ [x] |>.foldl (λ (a, b) x ↦ if b.length = 7 then (a ++ (b ++ [x] |> BitVec.ofBoolListBE |>.toNat |> Char.ofNat).toString, []) else (acc.1, acc.2 ++ [x])) ("", []) else (a, b ++ [x])) ("", []) |>.1 #eval encode s |> decode
-