Skip to content

Commit

Permalink
Fix typo in Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lbarasti committed Nov 12, 2016
1 parent 2411479 commit 9726d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -104,7 +104,7 @@ failure = Try{fail}
Try{success}.flatten # Success(:ok)
Try{failure}.flatten # Failure(RuntimeError)
```
#flatten accepts one argument, defaulting to 1, which indicates the depth of the flattening operation. Mind that a `Success` can only be flattened as long as it wraps a Try instance. A `Failure` can be flattened an arbitrary number of times, as it always returns itself.
flatten accepts one argument, defaulting to 1, which indicates the depth of the flattening operation. Mind that a `Success` can only be flattened as long as it wraps a Try instance. A `Failure` can be flattened an arbitrary number of times, as it always returns itself.
```
Try{success}.flatten(1) == Try{success}.flatten # true
Try{success}.flatten(2) # raises TypeError: Argument must be an array-like object. Found Fixnum
Expand Down

0 comments on commit 9726d70

Please sign in to comment.