replace partial with pryr::partial. fix (hopefully) vectorized compose function