Inspired by Railway Oriented Programming on the F# for Fun and Profit blog and also Errors are values by Rob Pike on The Go Blog and github.com/samber/mo.
If you already use github.com/samber/mo then you may prefer to use its option.PipeN or result.PipeN functions instead.
go get github.com/nnutter/railway