Stream: beginners

Topic: Backpassing with pipes


view this post on Zulip David Dunn (Feb 05 2023 at 17:55):

I'm trying to use backpassing after a pipe:

    ["a", "b", "c", "d"]
    |>
        n <- List.map
        Str.concat "0x" n

But this gives an "unknown operator" error for the backpassing arrow <-. I've only got backpassing to work here by wrapping the map call in an anonymous function:

    ["a", "b", "c", "d"]
    |> (\l ->
        n <- List.map l
        Str.concat "0x" n)

Is there a way to use backpassing after a pipe without the extra anonymous function?

view this post on Zulip Folkert de Vries (Feb 05 2023 at 18:00):

no


Last updated: Jul 06 2025 at 12:14 UTC