Semordnilap: Difference between revisions

m
(Added Uiua solution)
 
Line 3,485:
 
=={{header|Uiua}}==
For each word check its reverse is in the array, and that it's greater. This removes palindromes and also keeps only first of each pair.
 
<syntaxhighlight lang="Uiua">
&p &pf "Number of pairsCount: " ÷2⧻.▽≡(׬≍⇌>⇌.⟜(∊⇌)⟜∊⇌)⟜¤. ⊜□ ≠@\n. &fras "unixdict.txt"
</syntaxhighlight>
{{out}}
<pre>
Number of pairsCount: 158
{"able" "abut" "ac" "ah" "al" "am" "amos" "and" "ape" "aps" "are" "ares" "aryl" "as" "at" "ate" "ave" "avid" "avis" "aviv" "avon" "bad" "bag" "ban" "bard" "bat"
...
vi"pot" "vivapow" "vonpus" "vtrat" "wacraw" "wahrot" "wangsaw" "warsuez" "wardtort" "wastv" "way" "wed" "wolf" "won" "wop" "xi" "yah" "yak" "yam" "yap" "yaw" "zap" "zeus"}
 
</pre>
 
62

edits