From d70091ac8bc2b89a6244990f840a91c9f8979527 Mon Sep 17 00:00:00 2001 From: Conor Hoekstra Date: Thu, 21 Oct 2021 19:15:19 -0400 Subject: Refactor --- challenge-135/conor-hoekstra/ch-01.bqn | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/challenge-135/conor-hoekstra/ch-01.bqn b/challenge-135/conor-hoekstra/ch-01.bqn index 7d91a8a263..c93246ea4a 100644 --- a/challenge-135/conor-hoekstra/ch-01.bqn +++ b/challenge-135/conor-hoekstra/ch-01.bqn @@ -1,9 +1,7 @@ -Fmt ← '0'+·⌽10|·⌊⊢÷(10⋆↕∘(⌊1+10⋆⁼1⌈|)) - MiddleThreeDigits ← { - 0=2|≠Fmt|𝕩 ? "Even # of digits" ; - 3>≠Fmt|𝕩 ? "Too short" ; - (3↑(2÷˜¯3+≠)↓⊢)Fmt|𝕩 + 0=2|≠•Fmt|𝕩 ? "Even # of digits" ; + 3>≠•Fmt|𝕩 ? "Too short" ; + (3↑(2÷˜¯3+≠)↓⊢)•Fmt|𝕩 } MiddleThreeDigits 1234567 # "345" -- cgit