Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaninja committed Sep 2, 2023
1 parent 4ed0739 commit 8e976e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn print_credit_card(card: CreditCard) {
// Print credit card details
}

fn print_user_credit_card<F>(user: F)
fn print_user_credit_card_of<F>(user: F)
where
F: Functor<CreditCard, Param=User>,
F::Target<CreditCard>: Functor<(), Param=CreditCard>,
Expand All @@ -95,16 +95,16 @@ fn print_user_credit_card<F>(user: F)
...usage:

```rust
fn get_user(id: u32) -> Option<User> {
fn user(id: u32) -> Option<User> {
// Get user from database
}

fn get_all_users() -> Vec<User> {
fn all_users() -> Vec<User> {
// Get all users from database
}

print_user_credit_card(get_user(1));
print_user_credit_card(get_all_users());
print_user_credit_card_of(user(1));
print_user_credit_card_of(all_users());
```

2. Validation accumulating all errors.
Expand Down

0 comments on commit 8e976e9

Please sign in to comment.