Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline operator #39

Open
prakhar1989 opened this issue Mar 28, 2016 · 1 comment
Open

Pipeline operator #39

prakhar1989 opened this issue Mar 28, 2016 · 1 comment
Labels

Comments

@prakhar1989
Copy link
Owner

Add a pipeline operator to simplify function composition.

OCaml syntax

# let path = "/usr/bin:/usr/local/bin:/bin:/sbin";;
val path : string = "/usr/bin:/usr/local/bin:/bin:/sbin"
#   String.split ~on:':' path
  |> List.dedup ~compare:String.compare
  |> List.iter ~f:print_endline
  ;;
@prakhar1989
Copy link
Owner Author

Inspiration - https://docs.hhvm.com/hack/operators/pipe-operator. Good ideas on using $$ as placeholder for capturing output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant