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