We're updating the issue view to help you get more done. 

maybe-m breaks the monad laws.

Description

One of the monad laws is that (m-bind (m-result v) f) should be the same as (f v). However, this is not the case in maybe-m:

user=> (with-monad maybe-m (m-bind (m-result nil) nil?))
nil

user=> (nil? nil)
true

The crux of the problem is that in algo.monad's maybe-m, there is no way to wrap a nil in a Just-like container.

Environment

None

Status

Assignee

Konrad Hinsen

Reporter

import

Labels

None

Approval

None

Patch

None

Priority

Major