import { Semiring } from './Semiring' /** * @category model * @since 2.0.0 */ export interface Ring extends Semiring { readonly sub: (x: A, y: A) => A } /** * Given a tuple of `Ring`s returns a `Ring` for the tuple * * @example * import { tuple } from 'fp-ts/Ring' * import * as N from 'fp-ts/number' * * const R = tuple(N.Field, N.Field, N.Field) * assert.deepStrictEqual(R.add([1, 2, 3], [4, 5, 6]), [5, 7, 9]) * assert.deepStrictEqual(R.mul([1, 2, 3], [4, 5, 6]), [4, 10, 18]) * assert.deepStrictEqual(R.one, [1, 1, 1]) * assert.deepStrictEqual(R.sub([1, 2, 3], [4, 5, 6]), [-3, -3, -3]) * assert.deepStrictEqual(R.zero, [0, 0, 0]) * * @since 2.10.0 */ export declare const tuple: ( ...rings: { [K in keyof A]: Ring } ) => Ring> /** * `negate x` can be used as a shorthand for `zero - x` * * @since 2.0.0 */ export declare const negate: (R: Ring) => (a: A) => A /** * Use [`tuple`](#tuple) instead. * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const getTupleRing: >>( ...rings: T ) => Ring<{ [K in keyof T]: T[K] extends Ring ? A : never }> /** * Use [`getRing`](./function.ts.html#getring) instead. * * @category zone of death * @since 2.0.0 * @deprecated */ export declare const getFunctionRing: (R: Ring) => Ring<(a: A) => B>