Skip to content

Commit

Permalink
Fix comments regarding maybe_to_seq and singleton_seq_as_maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobiasd committed Dec 26, 2023
1 parent f61b476 commit c21f71e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/fplus/maybe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ maybe<T> just_if(Pred pred, const maybe<T>& maybe)
// API search type: maybe_to_seq : Maybe a -> [a]
// fwd bind count: 0
// Converts a maybe to a sequence.
// singleton_seq(Just 3) == [3]
// singleton_seq(Nothing) == []
// maybe_to_seq(Just 3) == [3]
// maybe_to_seq(Nothing) == []
template <typename T, typename ContainerOut = std::vector<T>>
ContainerOut maybe_to_seq(const maybe<T>& maybe)
{
Expand All @@ -335,9 +335,9 @@ ContainerOut maybe_to_seq(const maybe<T>& maybe)
// API search type: singleton_seq_as_maybe : [a] -> Maybe a
// fwd bind count: 0
// Converts a sequence to a maybe.
// singleton_seq([]) == Nothing
// singleton_seq([3]) == Just 3
// singleton_seq([3,4]) == Nothing
// singleton_seq_as_maybe([]) == Nothing
// singleton_seq_as_maybe([3]) == Just 3
// singleton_seq_as_maybe([3,4]) == Nothing
template <typename Container>
maybe<typename Container::value_type>
singleton_seq_as_maybe(const Container& xs)
Expand Down

0 comments on commit c21f71e

Please sign in to comment.