Skip to content

Instantly share code, notes, and snippets.

@hcarty
Created August 5, 2019 19:18
Show Gist options
  • Save hcarty/ca271c917df3c6b5274d8b8ff6c52a7c to your computer and use it in GitHub Desktop.
Save hcarty/ca271c917df3c6b5274d8b8ff6c52a7c to your computer and use it in GitHub Desktop.
GADT to wrap steps when using lwt_pipeline
type ('a, 'b) pipeline =
| [] : ('a, 'a) pipeline
| ( :: ) : ('a, 'b) Pipeline.step * ('b, 'c) pipeline -> ('a, 'c) pipeline
let pointless_pipeline = [Pipeline.sync sin; Pipeline.sync cos; Pipeline.sync Float.to_string]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment