Skip to content

Commit

Permalink
recover previous applicative example
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaninja committed Sep 29, 2023
1 parent 26026fa commit 1fe9c18
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/applicative.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//! ```
//! use rust2fun::prelude::*;
//!
//! # type CreditCardNumber = String;
//! # type Date = String;
//! # type CreditCardNumber = u64;
//! # type Date = (u8, u8);
//! # type Code = u16;
//! # type Error = u8;
//! #
Expand Down Expand Up @@ -44,10 +44,10 @@
//! expiration: Date,
//! cvv: Code,
//! ) -> Result<CreditCard, Error> {
//! Result::pure(CreditCard::new)
//! .ap3(validate_number(number),
//! validate_expiration(expiration),
//! validate_cvv(cvv))
//! Result::pure(curry3!(CreditCard::new))
//! .ap(validate_number(number))
//! .ap(validate_expiration(expiration))
//! .ap(validate_cvv(cvv))
//! }
//! ```

Expand Down

0 comments on commit 1fe9c18

Please sign in to comment.