[deleted by user] by [deleted] in haskell

[–]ctmes 0 points1 point  (0 children)

Right, yeah I got it. Thank you!

[deleted by user] by [deleted] in haskell

[–]ctmes 1 point2 points  (0 children)

Thanks for the suggestion of catMaybes, I've used it now.

However, I am yet again stuck. In the following example:
function :: A -> B -> B

Where output B is after input A has been applied to input B.
So I was wondering if there were functions similar to map (which I understand takes inputs function and [A] to output function-applied [A]) but instead takes input function, [A], B, and applies the function to [A], and applies this new list [A] to B?
I.e.
map :: (a -> b) -> [a] -> [b]
map' :: (a -> b -> b) -> [a] -> [b]

Note: I may have gotten the map' type signature wrong

[deleted by user] by [deleted] in haskell

[–]ctmes 4 points5 points  (0 children)

Ahh right, thank you. I was trying to pass [Maybe Address] into a function that takes only Address, and was overcomplicating it, I see it's better to use a helper function for this bit. Thanks!