Stream: ideas

Topic: Task.batch variable names


view this post on Zulip Luke Boswell (Jun 10 2023 at 02:14):

As discussed in #beginners for Task.batch I propose the following implementation for basic-cli; specifically do these names make "sense"?

batch : Task a err -> (Task (a -> b) err -> Task b err)
batch = \current -> \next ->
    f <- next |> Task.await

    Task.map current f

view this post on Zulip Luke Boswell (Jun 10 2023 at 02:15):

My basic feeling is that this takes a task, it then applies another task with a "builder" function to make another task.


Last updated: Jun 16 2026 at 16:19 UTC