aboutsummaryrefslogtreecommitdiff
path: root/monad.go
diff options
context:
space:
mode:
Diffstat (limited to 'monad.go')
-rw-r--r--monad.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/monad.go b/monad.go
index 4248579..e7be48c 100644
--- a/monad.go
+++ b/monad.go
@@ -3,13 +3,13 @@ package main
import "math/cmplx"
var monads = map[rune]Monad{
- '+': identity,
+ '+': conjugate,
'-': negate,
'×': direction,
'÷': reciprocal,
}
-func identity(w complex128) complex128 { return cmplx.Conj(w) }
+func conjugate(w complex128) complex128 { return cmplx.Conj(w) }
func negate(w complex128) complex128 { return -w }
func direction(w complex128) complex128 { return w / complex(cmplx.Abs(w), 0) }
func reciprocal(w complex128) complex128 { return 1.0 / w }