Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • \$\begingroup\$ Doesn't s have to be either read from STDIN or supplied as a function argument? The challenge also specifies that the input may be given as an array of characters. Converting to a stabby lambda and dropping chars gives a 16-byte solution. \$\endgroup\$ Commented May 31, 2017 at 17:30
  • \$\begingroup\$ I wasn't really sure how the input was to be addressed, given that it wasn't explicitly specified. There are a few other answers that assume the existence of the input in a variable. Is there a codegolf convention? I don't do this much. \$\endgroup\$ Commented May 31, 2017 at 18:54
  • \$\begingroup\$ @sethrin With a stabby lambda wouldn't it be 20 chars? ->(s){[*' '..?~]-s)} \$\endgroup\$ Commented May 31, 2017 at 18:58
  • \$\begingroup\$ All of the parentheses in your lambda are optional. But I may have miscounted a byte. Other languages either accept input implicitly or have stdin bound to a global variable. In Ruby $< is a shortcut for stdin but lambdas tend to be shorter. The conventions on input and output are here. I also don't do this much, so if the rules aren't what I think do let me know. \$\endgroup\$ Commented May 31, 2017 at 21:27