(no title)
yhavr | 2 years ago
func myfunc(url string) Result[string] {
tup := FromTuplePtr(http.Get(url))
return FlatMap(tup, func(r http.Response) Result[string] {
return Map(FromTuple(io.ReadAll(r.Body)), func(b []byte) string {
return string(b)
})
})
}
No comments yet.