Stream: ideas

Topic: Result.map_ok!


view this post on Zulip Anton (Aug 20 2025 at 17:15):

Can I add Result.map_ok! to the builtins? I've wanted to use that function on multiple occasions, but it did not exist :p

view this post on Zulip Richard Feldman (Aug 20 2025 at 18:08):

yep!

view this post on Zulip Ruby (Aug 21 2025 at 19:12):

Is it an effectfull version of Result.map_ok?

view this post on Zulip Richard Feldman (Aug 22 2025 at 11:45):

hm, I just realized - what would this be used for? :thinking:

view this post on Zulip Richard Feldman (Aug 22 2025 at 11:46):

because effectful functions themselves usually return a Result - so wouldn't map_ok! usually produce a Result of a Result?

view this post on Zulip Anton (Aug 22 2025 at 11:51):

Hmm, yeah we don't want nested results, I'll come back to this when I feel like I need this function again :smile:


Last updated: Jun 16 2026 at 16:19 UTC