import {Complex} from './type.js' import type {Dependencies, Signature} from '../interfaces/type.js' export const isReal = (dep: Dependencies<'add' | 'equal' | 'isReal', T>): Signature<'isReal', Complex> => z => dep.isReal(z.re) && dep.equal(z.re, dep.add(z.re, z.im)) export const isSquare: Signature<'isSquare', Complex> = z => true // FIXME: not correct for Complex once we get there