diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2021-05-29 21:18:58 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2021-05-29 21:18:58 +0100 |
| commit | 608882c40389fc8a71b61341bc3c409d2024d617 (patch) | |
| tree | 4fb7ca669cabf6170eb2074f7dec87fc2bfb1731 | |
| parent | 10811f4529e60ca4a9c2910bbc5780f6b21bfedc (diff) | |
| download | perlweeklychallenge-club-608882c40389fc8a71b61341bc3c409d2024d617.tar.gz perlweeklychallenge-club-608882c40389fc8a71b61341bc3c409d2024d617.tar.bz2 perlweeklychallenge-club-608882c40389fc8a71b61341bc3c409d2024d617.zip | |
- Added APL solutions by Richard Park.
| -rw-r--r-- | challenge-114/richard-park/apl/ch-1.aplf | 1 | ||||
| -rw-r--r-- | challenge-114/richard-park/apl/ch-2.aplf | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/challenge-114/richard-park/apl/ch-1.aplf b/challenge-114/richard-park/apl/ch-1.aplf new file mode 100644 index 0000000000..c6951f9c12 --- /dev/null +++ b/challenge-114/richard-park/apl/ch-1.aplf @@ -0,0 +1 @@ +NextPalindromeNumber←{(⊢≡⌽)⍕⍵:⍵ ⋄ ∇ ⍵+1}
\ No newline at end of file diff --git a/challenge-114/richard-park/apl/ch-2.aplf b/challenge-114/richard-park/apl/ch-2.aplf new file mode 100644 index 0000000000..23761cf55a --- /dev/null +++ b/challenge-114/richard-park/apl/ch-2.aplf @@ -0,0 +1,7 @@ + HigherIntegerSetBits←{ + n←⍵+1 ⍝ Next integer + (sb nb)←+⌿2⊥⍣¯1⊢⍵,n ⍝ Set Bits, Next Bits + ⍺←sb ⍝ Fix set bits for recursion + ⍺=nb:n ⍝ Found, return result + ⍺ ∇ n ⍝ Try next number + }
\ No newline at end of file |
