Created
September 20, 2020 17:43
-
-
Save habib-sadullaev/0b687c0bc45498edf66a65762d23562b to your computer and use it in GitHub Desktop.
traverse Expr<'a> list into Expr<'a list>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let traverse (exprs: Expr<'a> list) = | |
let folder elem state = <@ %elem :: %state @> | |
let init = <@ [] @> | |
List.foldBack folder exprs init | |
[1..3] |> List.map (fun x -> <@ x @>) |> traverse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment