Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
louthy committed Feb 19, 2015
2 parents 6eba243 + dc0ce16 commit 5871457
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
16 changes: 8 additions & 8 deletions CSharpMonad.UnitTests/src/ReaderWriterStateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ from t in RWS.Tell<Env, string, App>("Process complete")
select x * y)
.Memo(new Env(), new App());

var res = rws();
var res = rws();

Assert.IsTrue(res.Value == 3400);
Assert.IsTrue(res.State.UsersLoggedIn == 35);
Assert.IsTrue(res.Output.Count() == 3);
Assert.IsTrue(res.Output.First() == "Users logged in: 34");
Assert.IsTrue(res.Output.Skip(1).First() == "System folder: C:/Temp");
Assert.IsTrue(res.Output.Skip(2).First() == "Process complete");
Assert.IsTrue(res.Value == 3400);
Assert.IsTrue(res.State.UsersLoggedIn == 35);
Assert.IsTrue(res.Output.Count() == 3);
Assert.IsTrue(res.Output.First() == "Users logged in: 34");
Assert.IsTrue(res.Output.Skip(1).First() == "System folder: C:/Temp");
Assert.IsTrue(res.Output.Skip(2).First() == "Process complete");
}

public static RWS<Env, string, App, int> Value(int val, string log)
Expand All @@ -76,4 +76,4 @@ public class Env
{
public string SystemFolder = "C:/Temp";
}
}
}
2 changes: 1 addition & 1 deletion CSharpMonad.UnitTests/src/WriterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ private static Writer<string, int> LogNumber(int num)
return () => Writer.Tell(num, "Got number: " + num);
}
}
}
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![csharp-monad](http://www.4four.org/images/csharp-monad-logo.png)

csharp-monad
============

Expand All @@ -18,6 +20,7 @@ A C# library of monads and a full set of parser combinators based on the Haskell

The library is stable, functional and pretty well tested.

__NuGet__ https://www.nuget.org/packages/csharp-monad/

### A note about laziness

Expand Down

0 comments on commit 5871457

Please sign in to comment.