Hacker News new | ask | show | jobs
by mej10 3641 days ago
In math ( * ) is a binary operation. ( * 2) returning 2 is confusing to everyone that hasn't gotten used to a non-standard way of thinking about * .
2 comments

> In math ( * ) is a binary operation.

https://en.wikipedia.org/wiki/Empty_product

I am talking about Empty Product.

In all Lisps I know ( * ) returns 1, (* n) returns n. Which makes sense.

Shen's example is confusing for me.

* :: a -> a -> a

Π :: {a} -> a

This would make nonsense out of exponents less than 2. Fortunately, they actually make perfect sense.