Skip to content

Commit

Permalink
Move to version 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-lairan committed Apr 15, 2020
1 parent f7cb2b2 commit dcd1d4e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
8 changes: 8 additions & 0 deletions spec/monads/either/right_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ describe Monads::Right do
end
end

describe "#|" do
it "#| apply proc" do
monad = Monads::Right.new(1) | ->(x : Int32) { Monads::Right.new(x.to_s) }
monad.should eq(Monads::Right.new("1"))
end
end


describe "self.return" do
it "`self.return` return Right" do
monad = Monads::Either.return(1)
Expand Down
2 changes: 1 addition & 1 deletion spec/monads_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ require "./monads/**"

describe Monads do
it "should have version" do
Monads::VERSION.should eq("0.5.1")
Monads::VERSION.should eq("0.7.0")
end
end
2 changes: 1 addition & 1 deletion src/monads.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ require "./monads/*"
module Monads
# Requirements for 1.0.0
# - Documentation
VERSION = "0.5.1"
VERSION = "0.6.0"
end
4 changes: 0 additions & 4 deletions src/monads/monad.cr
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ module Monads
self.bind(other)
end

def |(&block : _ -> Monad(U)) forall U
self.bind(block)
end

def >>(other : Monad(U)) forall U
other
end
Expand Down

0 comments on commit dcd1d4e

Please sign in to comment.