aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-04-04 16:13:26 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-04-04 16:13:26 +0200
commit3623974ee58fb63dfe8a064940f260a85082a053 (patch)
tree9392286e6a50f60df59114a310e21b88afc9a833
parent4399e8cb7b9683abdfe8d0e39c8c6b26decd40f7 (diff)
Rename
-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 }