Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Smalltalk, 138#

Smalltalk, 138

input in s:

m:=(s select:[:c|cisLetter])asLowercase asBag sortedCounts map:#value.
i:=($ato:$z).m:=m,(i copyWithoutAll:m).
s copyTransliterating:i to:m

the decoder is:

s copyTransliterating:m to:i

but as (if I understand correctly) I may not reuse "i" and "m", I'll golf without it. Code above has two additional CRs inserted for readability, which were uncounted in the char count.

#Smalltalk, 138#

input in s:

m:=(s select:[:c|cisLetter])asLowercase asBag sortedCounts map:#value.
i:=($ato:$z).m:=m,(i copyWithoutAll:m).
s copyTransliterating:i to:m

the decoder is:

s copyTransliterating:m to:i

but as (if I understand correctly) I may not reuse "i" and "m", I'll golf without it. Code above has two additional CRs inserted for readability, which were uncounted in the char count.

Smalltalk, 138

input in s:

m:=(s select:[:c|cisLetter])asLowercase asBag sortedCounts map:#value.
i:=($ato:$z).m:=m,(i copyWithoutAll:m).
s copyTransliterating:i to:m

the decoder is:

s copyTransliterating:m to:i

but as (if I understand correctly) I may not reuse "i" and "m", I'll golf without it. Code above has two additional CRs inserted for readability, which were uncounted in the char count.

Source Link
blabla999
  • 2k
  • 12
  • 11

#Smalltalk, 138#

input in s:

m:=(s select:[:c|cisLetter])asLowercase asBag sortedCounts map:#value.
i:=($ato:$z).m:=m,(i copyWithoutAll:m).
s copyTransliterating:i to:m

the decoder is:

s copyTransliterating:m to:i

but as (if I understand correctly) I may not reuse "i" and "m", I'll golf without it. Code above has two additional CRs inserted for readability, which were uncounted in the char count.

AltStyle によって変換されたページ (->オリジナル) /