Skip to content

Instantly share code, notes, and snippets.

@Synesso
Created May 25, 2009 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Synesso/117351 to your computer and use it in GitHub Desktop.
Save Synesso/117351 to your computer and use it in GitHub Desktop.
(for (i <- 100 to 999; j<- i to 999; val prod = i*j; val prodStr = prod.toString; if prodStr.equals(prodStr.reverse.toString)) yield (i, j, prodStr)).foldLeft((1,1,"1")){ (max, next) => if (max._3.toInt > next._3.toInt) max else next }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment