Haskell
Such wow

by Dejan Kovacevic

get "/i/search/contacts/:userId" (continue search) $
        accept "application" "json"
        .&. capture "userId"
        .&. query "q"
        .&. def (unsafeRange 30) (query "size")

getUserDirectory :: JSON ::: UserId -> Handler Response
getUserDirectory (_ ::: uid) = do
    user <- fmap egrUser <$> getUser uid
    return $ case user of
        Just u -> json u
        _      -> setStatus status404 empty