diff options
| author | Conor Hoekstra <codereport@outlook.com> | 2021-10-21 19:15:19 -0400 |
|---|---|---|
| committer | Conor Hoekstra <codereport@outlook.com> | 2021-10-21 19:15:19 -0400 |
| commit | d70091ac8bc2b89a6244990f840a91c9f8979527 (patch) | |
| tree | 33e9feff3d22430d865ad0b1101b817fd6f3544d | |
| parent | 1f2c563d631e01a8707ee098c1bb3905bfe32501 (diff) | |
| download | perlweeklychallenge-club-d70091ac8bc2b89a6244990f840a91c9f8979527.tar.gz perlweeklychallenge-club-d70091ac8bc2b89a6244990f840a91c9f8979527.tar.bz2 perlweeklychallenge-club-d70091ac8bc2b89a6244990f840a91c9f8979527.zip | |
Refactor
| -rw-r--r-- | challenge-135/conor-hoekstra/ch-01.bqn | 8 |
1 files 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" |
