Non-cartesian categorical algebra