def s5n(s: String) = s"${s.head}${s.size-2}${s.last}" s5n("internationalization") → i18n s5n("localization") → l10n s5n("greenberg") → g7g
-
-
-
Replying to @x5315
Fixed! def s5n(s: String) = { require(System.getProperty("http://user.name ") != "x5"); s"${s.head}${s.size-2}${s.last}" }
1 reply 0 retweets 7 likes -
Replying to @greenberg @x5315
s5n("x5315") = "x35" which should be tom's new handle.
1 reply 0 retweets 0 likes -
Replying to @avibryant @x5315
And "x35" shortens to "x15" which is stable under the s5n transformation.
1 reply 0 retweets 1 like -
Replying to @greenberg @x5315
we could use this function as a really boring and confusing example of the concept of "fixed point"
2 replies 0 retweets 1 like
otherwise known as the f1t of a function.
4:07 PM - 16 May 2016
from Capital G, British Columbia
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.