Skip to content

Commit

Permalink
Review Reader local function
Browse files Browse the repository at this point in the history
  • Loading branch information
d-plaindoux committed Sep 17, 2023
1 parent 7a088e6 commit d68ef22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/standard/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl<'e, E: Copy + 'e, F: Monad<'e> + 'e> ReaderK<'e, E, F> {
Reader(Box::new(F::returns), PhantomData)
}

pub fn local<A>(f: fn(E) -> E, reader: Reader<'e, E, F, A>) -> Reader<'e, E, F, A> {
pub fn local<A>(f: Box<dyn Fn(E) -> E>, reader: Reader<'e, E, F, A>) -> Reader<'e, E, F, A> {
let Reader(run, _) = reader;
Reader(Box::new(move |e| run(f(e))), PhantomData)
}
Expand Down

0 comments on commit d68ef22

Please sign in to comment.