August 2009
3 posts
functional programming ftw
Simple, but fun:
def partition[T](items: List[T], p: (T, T) => Boolean): List[List[T]] = {
items.foldRight[List[List[T]]](Nil)((item: T, items: List[List[T]]) => items match {
case (first :: rest) :: last if p (first, item) =>
(List(item)) :: (first :: rest) :: last
case (first :: rest) :: last =>
(item :: first :: rest) :: last
case _ => List(List(item))
...
Party Reminder
Karaoke tonight for my birthday and Alice’s return to NYC. 2nd on 2nd @ 10pm. Pre party @ Tom & Jerry’s. Facebook invite is here.
See all y’all tonight!
Take a look at how Apple would be able to quickly build a large search engine...
– Schmidt Resignation: Is Apple Building Apple Search Service? - SiliconValleyWatcher
Apple doesn’t have the technical expertise to build a quality search engine. It isn’t even close.