route (r:routes) handle request
    | isMatch   = (snd r) handle request (get params)
    | otherwise = route routes handle request
    where
    (isMatch, params) = (fst r) (uri request)

-- |Wrap a handler in a route
-- Lets you use a handler (no parameters) as a route
route (r:routes) handle request
    | isMatch   = (snd r) handle request (get params)
    | otherwise = route routes handle request
    where
    (isMatch, params) = (fst r) (uri request)

-- |Wrap a handler in a route
-- Lets you use a handler (no parameters) as a route
route (r:routes) handle request
    | isMatch   = (snd r) handle request (get params)
    | otherwise = route routes handle request
    where
    (isMatch, params) = (fst r) (uri request)

-- |Wrap a handler in a route
-- Lets you use a handler (no parameters) as a route