Skip to content

Instantly share code, notes, and snippets.

@scan
scan / righter.scala
Created May 14, 2011 06:30
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) + " "))