Skip to content

Commit

Permalink
📝 Add return type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
MystPi committed Mar 28, 2024
1 parent 1882035 commit d2a94a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning].

## [Unreleased]

### Changed

- Added missing return type annotations to example functions in doc comments.

## [0.2.0] - 2024-03-25

### Added
Expand Down
6 changes: 3 additions & 3 deletions src/act.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub fn error(value: error) -> ResultAction(ok, error, state) {
/// functions such as `do` do not pass the updated state to their callbacks.
///
/// ```
/// fn foo() {
/// fn foo() -> Action(result, state) {
/// use original_state <- do(get_state())
/// use result <- do(some_action)
/// use new_state <- do(get_state())
Expand Down Expand Up @@ -197,7 +197,7 @@ pub fn map_error(
/// together with `use` expressions.
///
/// ```
/// fn foo() {
/// fn foo() -> Action(String, state) {
/// use a_result <- do(some_action)
/// use another_result <- do(another_action("blah"))
/// return(a_result <> another_result)
Expand All @@ -207,7 +207,7 @@ pub fn map_error(
/// Using `use` is of course optional.
///
/// ```
/// fn bar() {
/// fn bar() -> Action(result, state) {
/// do(some_action, fn(result) {
/// io.debug(result)
/// return(result)
Expand Down

0 comments on commit d2a94a9

Please sign in to comment.