Skip to content

Instantly share code, notes, and snippets.

@scan
Created May 14, 2011 06:30
Show Gist options
  • Save scan/971992 to your computer and use it in GitHub Desktop.
Save scan/971992 to your computer and use it in GitHub Desktop.
String Righter
#!/bin/sh
exec scala $0 $@
!#
def righter(str: String) = str.head + (str.slice(1,str.length-2).sorted) + std.last
args.foreach(s => print(righter(s) + " "))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment